Skip to content

Commit

Permalink
feat: up
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOliveiraM committed Sep 19, 2023
1 parent 08115e4 commit a0899c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ const AsyncSelectStory = () => {
},
})

const handleLoadOptions = (searchValue: string) =>
const handleLoadOptions = (searchValue?: string) =>
new Promise<AsyncSelectOption[]>(resolve => {
setTimeout(() => {
resolve(
options.filter(i => i.label.toLowerCase().includes(searchValue.toLowerCase()))
options.filter(i =>
i.label.toLowerCase().includes(searchValue?.toLowerCase() || '')
)
)
}, 700)
})
Expand Down

0 comments on commit a0899c9

Please sign in to comment.