perf(таблица): стабильные колбэки поиска для SettingsPanel
onSearchNext/onSearchPrevious были стрелками в JSX и ломали memo панели. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c724197682
commit
365becc55a
@ -550,6 +550,9 @@ const RealtimeTable = ({ formType, formId, sheetName, direction, year }) => {
|
||||
[handleNavigateToColumn, searchMatches],
|
||||
);
|
||||
|
||||
const handleSearchNext = useCallback(() => navigateToSearchMatch(1), [navigateToSearchMatch]);
|
||||
const handleSearchPrevious = useCallback(() => navigateToSearchMatch(-1), [navigateToSearchMatch]);
|
||||
|
||||
const handleSearchKeyDown = useCallback(
|
||||
(event) => {
|
||||
if (event.key !== 'Enter') return;
|
||||
@ -775,8 +778,8 @@ const RealtimeTable = ({ formType, formId, sheetName, direction, year }) => {
|
||||
onGlobalFilterChange={handleGlobalFilterChange}
|
||||
globalFilter={globalFilter}
|
||||
onSearchKeyDown={handleSearchKeyDown}
|
||||
onSearchNext={() => navigateToSearchMatch(1)}
|
||||
onSearchPrevious={() => navigateToSearchMatch(-1)}
|
||||
onSearchNext={handleSearchNext}
|
||||
onSearchPrevious={handleSearchPrevious}
|
||||
searchMatchCount={searchMatches.length}
|
||||
searchMatchIndex={searchMatchIndex}
|
||||
sizeMult={sizeMult}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user