Did you clear cache before opening an issue?
Is there an existing issue for this?
Does the issue happen when logged in?
Yes
Does the issue happen when logged out?
Yes
Does the issue happen in incognito mode when logged in?
Yes
Does the issue happen in incognito mode when logged out?
Yes
Account name
No response
Account config
No response
Current Behavior
If you type something in the search bar of the quote search modal, and then delete it, the quotes displayed are still the ones from the previous search.
The following error can be observed in the console:
Uncaught TypeError: can't access property "matchAll", text is undefined
performSearch QuoteSearchModal.tsx:260
QuoteSearchModal QuoteSearchModal.tsx:226
exec index.js:77
setTimeout handler*wrapper index.js:126
result dev.js:493
untrack dev.js:474
on dev.js:493
runComputation dev.js:744
updateComputation dev.js:726
runTop dev.js:846
runUserEffects dev.js:956
completeUpdates dev.js:913
runUpdates dev.js:862
completeUpdates dev.js:913
runUpdates dev.js:863
writeSignal dev.js:701
setter dev.js:229
onChange QuoteSearchModal.tsx:480
triggerOnChangeListener FieldApi.ts:1839
setValue FieldApi.ts:1056
handleChange FieldApi.ts:1695
$$input InputField.tsx:92
handleNode dev.js:501
eventHandler dev.js:522
Expected Behavior
It should show all quotes, just like it does when the input is empty when opening the modal.
Steps To Reproduce
- Open the commandline, type
Search for quotes and press enter
- In the search bar, type
a
- Delete it
- Notice how the shown quotes are still filtered by
a, instead of showing all quotes.
Environment
- OS: Arch Linux
- Browser: Firefox
- Browser Version: 153.0.3
Anything else?
The error is caused by convertStringToValue converting an empty string into undefined:
|
if (newValue === "") return undefined; |
which is eventually passed to performSearch, which expects a string rather than string | undefined:
|
const performSearch = (text: string): void => { |
Did you clear cache before opening an issue?
Is there an existing issue for this?
Does the issue happen when logged in?
Yes
Does the issue happen when logged out?
Yes
Does the issue happen in incognito mode when logged in?
Yes
Does the issue happen in incognito mode when logged out?
Yes
Account name
No response
Account config
No response
Current Behavior
If you type something in the search bar of the quote search modal, and then delete it, the quotes displayed are still the ones from the previous search.
The following error can be observed in the console:
Expected Behavior
It should show all quotes, just like it does when the input is empty when opening the modal.
Steps To Reproduce
Search for quotesand press enteraa, instead of showing all quotes.Environment
Anything else?
The error is caused by
convertStringToValueconverting an empty string intoundefined:monkeytype/frontend/src/ts/components/ui/form/InputField.tsx
Line 177 in 90d038a
which is eventually passed to
performSearch, which expects a string rather thanstring | undefined:monkeytype/frontend/src/ts/components/modals/QuoteSearchModal.tsx
Line 244 in e46135e