I am using search component from Semantic UI. When I console.log what I typed in the search field, only a single character is printed ('abcd' will be printed as 'a', 'b', 'c', 'd') and the search field doesn't show any character as if it doesn't take any input. But If I used <Input> </Input>
instead, these problems are gone.
code sample is here
CodePudding user response:
This works as intended. Did you forget to actually set state?
const handleSearchChange = useCallback((e, data) => {
setValue(data.value);
setLoading(!loading);
}, []);