Skip to content

Type new option #78

Closed Answered by azeezat
smith15973 asked this question in Q&A
Aug 30, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@smith15973 Thanks for the question. The library has been updated to address your use case

Please use the example below

const [ingredients, setIngredients] = useState<string>([]);
  const [ingredientOptions, setIngredientOptions] = useState<any[]>([
    {label: 'Pepper', value: '1'},
    {label: 'Oil', value: '2'},
  ]);

  <DropdownSelect
            label="Ingredient"
            placeholder="Select or add ingredients..."
            options={ingredientOptions}
            selectedValue={ingredients}
            onValueChange={(itemValue: any) => setIngredients(itemValue)}
            isMultiple
            isSearchable
            primaryColor={'deepskyblue'}
            listEmptyCompo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@azeezat
Comment options

Answer selected by azeezat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants