1
0
Fork 0
mirror of synced 2024-10-03 10:36:59 +13:00

Ensure header cells properly update when reordered while a search value is applied

This commit is contained in:
Andrew Kingston 2023-10-13 19:17:49 +01:00
parent e3d6a68ea1
commit 27373a9648

View file

@ -28,6 +28,7 @@
schema,
focusedCellId,
filter,
inlineFilters,
} = getContext("grid")
const searchableTypes = [
@ -56,9 +57,14 @@
$: ascendingLabel = numericType ? "low-high" : "A-Z"
$: descendingLabel = numericType ? "high-low" : "Z-A"
$: searchable = isColumnSearchable(column)
$: resetSearchValue(column.name)
$: searching = searchValue != null
$: debouncedUpdateFilter(searchValue)
const resetSearchValue = name => {
searchValue = $inlineFilters?.find(x => x.id === `inline-${name}`)?.value
}
const isColumnSearchable = col => {
const { type, formulaType } = col.schema
return (