You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In packages/react-notion-x/src/components/search-dialog.tsx, It throttles the actual search frequency to 1 request / per second. but the _onChangeQuery will always set isLoading state to false every time the input value changed, which may result in a spinning state infinitely.
Suggested fix
Replace throttle with debounce, and add the {trailing: true} option.
Description
In packages/react-notion-x/src/components/search-dialog.tsx, It throttles the actual search frequency to 1 request / per second. but the
_onChangeQuery
will always setisLoading
state to false every time the input value changed, which may result in a spinning state infinitely.Suggested fix
Replace
throttle
with debounce, and add the{trailing: true}
option.The text was updated successfully, but these errors were encountered: