Skip to content

Commit

Permalink
docs: Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Sep 13, 2022
1 parent febda77 commit 88e0005
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/configurator/components/dataset-browse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export const SearchDatasetBox = ({
const onToggleIncludeDrafts = useEvent(async () => {
setIncludeDrafts(!includeDrafts);
if (inputRef.current && inputRef.current.value.length > 0) {
// We need to wait here otherwise the includeDrafts is reset :/
await new Promise((resolve) => setTimeout(resolve, 200));
onSubmitSearch(inputRef.current.value);
}
Expand Down

0 comments on commit 88e0005

Please sign in to comment.