Skip to content

Commit

Permalink
add isClearableCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
charmingduchess committed Nov 1, 2023
1 parent 7ee598a commit d57618c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/SearchForm/SearchForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ describe("SearchForm", () => {
const input = screen.getByRole("textbox")
await userEvent.clear(input)
})
it.todo("searches on an empty keyword after clearing the form")
it.todo("searches for {TBD} on an empty query")
it("submits a keyword query by default", async () => {
render(<SearchForm />)
const input = screen.getByRole("textbox")
Expand Down
1 change: 1 addition & 0 deletions src/components/SearchForm/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const SearchForm = () => {
textInputProps={{
isClearable: true,
onChange: (e) => handleChange(e, setSearchTerm),
isClearableCallback: () => setSearchTerm(""),
value: searchTerm,
labelText:
"Search by keyword, title, journal title, or author/contributor",
Expand Down

0 comments on commit d57618c

Please sign in to comment.