mirror of
https://github.com/D4M13N-D3V/neroshitron.git
synced 2025-03-14 10:05:04 +00:00
Update search_input.tsx
This commit is contained in:
parent
2edf752b05
commit
4c564df94a
@ -79,13 +79,13 @@ const SearchInput = ({ tagsChanged, searchChanged, nsfwChanged}: SearchInputProp
|
||||
<>
|
||||
<Select isMultiple isSearchable isClearable searchInputPlaceholder='Start typing to search tags...' options={tagOptions} placeholder="Start typing to search tags..."
|
||||
|
||||
onChange={(value: SelectValue | SelectValue[] | null) => {
|
||||
onChange={(value: Option | Option[] | null) => {
|
||||
if (value === null) {
|
||||
setSelectedTags([]);
|
||||
setSelectedTagsInput([]);
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
setSelectedTags(value.map((option: { value: string; }) => option.value));
|
||||
setSelectedTags(value.map((option) => option.value));
|
||||
setSelectedTagsInput(value as Option[])
|
||||
} else if (value) {
|
||||
setSelectedTags([value.value]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user