chakra-ui-autocomplete
chakra-ui-autocomplete copied to clipboard
"Create " text infront of my data in dropdown field
When updating the items={data} dynamic. I get a text in front of the data.
This happens when the items pickerItems
are loaded after the component renders them.
I had to apply a conditional render to avoid that.
{pickerItems.length > 0 && (
<CUIAutoComplete
label=""
placeholder="Type a Business Unit"
onCreateItem={handleCreateItem}
items={pickerItems}
selectedItems={selectedItems}
onSelectedItemsChange={changes => handleSelectedItemsChange(changes)}
hideToggleButton={true}
/>
)}
How did you fix?