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
1 changed files with 6 additions and 0 deletions

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 (