When using Shadcn ui's Select, cant do onChange...
Answered
American Kestrel posted this in #help-forum
American KestrelOP
...what should I use in the place of these, I'm replacing my html elements with shadcn's and dont know how to fix this
Answered by riský
try using
onValueChange and the value of that is just the value of item, so can just do onValueChange={setOrder}15 Replies
try using
onValueChange and the value of that is just the value of item, so can just do onValueChange={setOrder}Answer
also why do you need id prop?
American KestrelOP
nah, dont need it now that i think of it
@riský try using `onValueChange` and the value of that is just the value of item, so can just do `onValueChange={setOrder}`
American KestrelOP
how do you know this information 😊
its not in the docs
@American Kestrel its not in the docs
i just tried this yesterday... so i already had to try random methods to get it to work :)
let me know if it works 🙂
American KestrelOP
ooh damn
im lucky you're online rn;-;
thanks so much
im lucky you're online rn;-;
thanks so much
imma take a while before i know
gotta change the whole form, then make a aws lambda call to see if it actually works
gotta change the whole form, then make a aws lambda call to see if it actually works
but i think it will
@American Kestrel its not in the docs
select is based on radix select so you need to read the documentation of radix select too which does describe that prop
shadcn/ui is just radix with good styling
for functional documentation you need to refer to the radix documentation
ahh yeah that is smart (i just used vscode and saw the options and tried it)