@@ -95,7 +95,12 @@ export function DatabaseTableView({ instanceDatabaseMap, databaseName, tableName
9595 const { reset : resetFiltersForm } = columnFiltersForm ;
9696 const columnFiltersValues = columnFiltersForm . watch ( ) ;
9797
98- const [ appliedSearchConditions , setAppliedSearchConditions ] = useState < SearchCondition [ ] | null > ( null ) ;
98+ const [ appliedSearchConditions , setAppliedSearchConditions ] = useEffectedState < SearchCondition [ ] | null > ( null , [
99+ allParams . clusterId ,
100+ allParams . instanceId ,
101+ databaseName ,
102+ tableName ,
103+ ] ) ;
99104
100105 const applyFilters = useCallback ( ( ) => {
101106 const conditions : SearchCondition [ ] = [ ] ;
@@ -161,14 +166,15 @@ export function DatabaseTableView({ instanceDatabaseMap, databaseName, tableName
161166 onlyIfCached,
162167 } ) ,
163168 ) ;
169+
164170 // Filtered list
165171 const {
166172 data : filteredTableData ,
167173 isFetching : tableConditionsDataFetching ,
168174 } = useQuery (
169175 getSearchByConditionsOptions ( {
170176 ...instanceParams ,
171- enabled : useFilteredList ,
177+ enabled : useFilteredList && ! ! hashAttribute ,
172178 databaseName,
173179 tableName,
174180 conditions : appliedSearchConditions ,
@@ -178,7 +184,10 @@ export function DatabaseTableView({ instanceDatabaseMap, databaseName, tableName
178184 onlyIfCached,
179185 } ) ,
180186 ) ;
187+
181188 const tableData = useFilteredList ? filteredTableData : fullTableData ;
189+ const isFetching = tableDataFetching || tableConditionsDataFetching ;
190+
182191 // One by id
183192 const { data : searchByIdData } = useQuery (
184193 getSearchByIdOptions ( {
@@ -342,7 +351,7 @@ export function DatabaseTableView({ instanceDatabaseMap, databaseName, tableName
342351 < Button
343352 variant = "defaultOutline"
344353 onClick = { onRefreshClick }
345- disabled = { tableDataFetching || tableConditionsDataFetching }
354+ disabled = { isFetching }
346355 >
347356 < RefreshCwIcon />
348357 </ Button >
@@ -390,7 +399,7 @@ export function DatabaseTableView({ instanceDatabaseMap, databaseName, tableName
390399
391400 < TableView < Record < string , unknown > , unknown >
392401 data = { tableData ?. data }
393- isFetching = { tableDataFetching || tableConditionsDataFetching }
402+ isFetching = { isFetching }
394403 filtersToggled = { filtersToggled }
395404 columns = { dataTableColumns }
396405 columnVisibility = { columnVisibility }
0 commit comments