Files
supabase/apps/studio/components/interfaces/Database/Functions
Ali Waseem 0c931f8c58 fix(studio): use nuqs for database functions search to prevent caret jumping (#44909)
## Summary
- Fixes the cursor jumping to end of input on every keystroke in the
database functions search
- Replaced manual `useParams` + `router.push` URL sync with
`useQueryState` from nuqs, which updates state synchronously — matching
the pattern already used for the other filters on this page
- Removed the `setTimeout` hack in the SchemaSelector onChange that was
only needed because of the async URL update

Fixes FE-3000

## Test plan
- [x] Navigate to Database > Functions
- [x] Type a search string, then click in the middle of the string and
type — cursor should stay in place
- [x] Verify search filtering still works correctly
- [x] Verify switching schemas still clears the search input
- [x] Verify the `?search=` query param is still reflected in the URL

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved responsiveness of schema selection in the Functions
list—search filters now clear immediately when switching schemas,
eliminating previous delays.

* **Improvements**
* Enhanced URL state synchronization for better consistency with browser
history and navigation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-16 07:57:36 -06:00
..