You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Thank you for this great library!
In the provided jsx example code from the documentation, the <select> element uses the selected attribute directly on an <option> tag, which is not recommended in React.
<selectclassName="select w-full max-w-xs"><optiondisabledselected>Pick your favorite Simpson</option><option>Homer</option><option>Marge</option><option>Bart</option><option>Lisa</option><option>Maggie</option></select>
This results in the following warning:
Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.
Thank you @jlzhjp
for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I
find a solution.
In the meantime providing more details and reproduction links would be
helpful.
On which page do you see this issue?
https://daisyui.com/components/select/
Describe the issue
Hi, Thank you for this great library!
In the provided jsx example code from the documentation, the
<select>
element uses the selected attribute directly on an<option>
tag, which is not recommended in React.This results in the following warning:
Here's a link to the react documentation:
https://react.dev/reference/react-dom/components/select#providing-an-initially-selected-option
What browsers are you seeing the problem on?
All browsers
The text was updated successfully, but these errors were encountered: