Skip to content

Commit

Permalink
Chore: add missing property to clear itemselectquery
Browse files Browse the repository at this point in the history
  • Loading branch information
emielvanseveren committed Jul 16, 2024
1 parent 8e4f04b commit 1dbf34c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const ItemSelect: FC<ItemSelectProps> = ({
placeholder = 'Select an item',
gameServerId,
multiple,
canClear,
}) => {
const [itemName, setItemName] = useState<string>('');
const { field } = useController({ name, control });
Expand Down Expand Up @@ -88,6 +89,7 @@ export const ItemSelect: FC<ItemSelectProps> = ({
required={required}
loading={loading}
label={label}
canClear={canClear}
gameServer={gameServer}
setItemName={setItemName}
isLoadingData={isLoadingItems}
Expand Down Expand Up @@ -119,6 +121,7 @@ export const ItemSelectQueryView: FC<ItemSelectQueryViewProps> = ({
loading,
isLoadingData = false,
setItemName,
canClear,
label,
}) => {
const renderIcon = useCallback((gameServer: GameServerOutputDTO, item: ItemsOutputDTO) => {
Expand Down Expand Up @@ -151,6 +154,7 @@ export const ItemSelectQueryView: FC<ItemSelectQueryViewProps> = ({
multiple={multiple}
hasMargin={hasMargin}
description={description}
canClear={canClear}
render={(selectedItems) => {
if (selectedItems.length === 0) {
return <div>Select item...</div>;
Expand Down

0 comments on commit 1dbf34c

Please sign in to comment.