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
When using a deferred value to make a query (closely referencing the useDeferredValue docs example: https://react.dev/reference/react/useDeferredValue#usage), the first item in the list is not always highlighted when the query results update. Only after additional query refinement will the first result become selected.
We do get the desired behavior if we remove the shouldFilter={false}, but the auto-selection behavior should still work if you're relying on external filtering behavior.
Yep, ultimately the workaround we implemented was something like this, but it feels hacky to have to have a side effect on state to accomplish this. Ideally, the behavior should come baked in with Command if the user is not using it as a controlled component.
When using a deferred value to make a query (closely referencing the
useDeferredValue
docs example: https://react.dev/reference/react/useDeferredValue#usage), the first item in the list is not always highlighted when the query results update. Only after additional query refinement will the first result become selected.We do get the desired behavior if we remove the
shouldFilter={false}
, but the auto-selection behavior should still work if you're relying on external filtering behavior.Reproduction CodeSandbox: https://codesandbox.io/p/devbox/cmdk-suspense-9jth8l
Reproduction Video:
Screen.Recording.2024-04-29.at.3.09.10.PM.mov
Thank you!
The text was updated successfully, but these errors were encountered: