dropDown working with value=''
This commit is contained in:
parent
95600dca2d
commit
aa7a78231d
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ import { DropDownComponentType } from "../../types/components";
|
|||
import { classNames } from "../../utils";
|
||||
|
||||
export default function Dropdown({value, options, onSelect}:DropDownComponentType) {
|
||||
let [internalValue,setInternalValue] = useState(value??"Choose an option")
|
||||
let [internalValue,setInternalValue] = useState(value===""||!value?"Choose an option":value)
|
||||
return (
|
||||
<>
|
||||
<Listbox value={internalValue} onChange={(value)=>{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue