From 44b5fef6dcd6efeae613d6e57334cf5ca0305049 Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Fri, 10 Jul 2026 01:37:49 +0700 Subject: [PATCH] fix(api-tokens): clear the table filter when opening the create row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The inline "Create Token" row is a data row prepended at index 0, so an active table filter (globalFilterFn) or a non-first page hid it — clicking Create Token appeared to do nothing. handleCreateNew now calls setFilter(''), which clears the filter and resets pageIndex to 0 (clearPageOnFilterChange default), so the create row is always visible. Live-verified (docker/HEAD backend): with a non-matching filter, Create Token now shows the create row and clears the filter. Co-Authored-By: Claude Opus 4.8 --- frontend/src/pages/settings/settings-api-tokens.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/settings/settings-api-tokens.tsx b/frontend/src/pages/settings/settings-api-tokens.tsx index 7c984b4f..17cab18e 100644 --- a/frontend/src/pages/settings/settings-api-tokens.tsx +++ b/frontend/src/pages/settings/settings-api-tokens.tsx @@ -371,7 +371,10 @@ function SettingsAPITokens() { const handleCreateNew = useCallback(() => { setCreatingToken(true); createForm.reset(CREATE_TOKEN_DEFAULTS); - }, [createForm]); + // The create row is prepended at data index 0, so an active filter or a non-first + // page would hide it. Clearing the filter also resets pageIndex to 0. + setFilter(''); + }, [createForm, setFilter]); const handleCancelCreate = useCallback(() => { setCreatingToken(false);