Ensure header cells properly update when reordered while a search value is applied
This commit is contained in:
parent
e3d6a68ea1
commit
27373a9648
|
@ -28,6 +28,7 @@
|
||||||
schema,
|
schema,
|
||||||
focusedCellId,
|
focusedCellId,
|
||||||
filter,
|
filter,
|
||||||
|
inlineFilters,
|
||||||
} = getContext("grid")
|
} = getContext("grid")
|
||||||
|
|
||||||
const searchableTypes = [
|
const searchableTypes = [
|
||||||
|
@ -56,9 +57,14 @@
|
||||||
$: ascendingLabel = numericType ? "low-high" : "A-Z"
|
$: ascendingLabel = numericType ? "low-high" : "A-Z"
|
||||||
$: descendingLabel = numericType ? "high-low" : "Z-A"
|
$: descendingLabel = numericType ? "high-low" : "Z-A"
|
||||||
$: searchable = isColumnSearchable(column)
|
$: searchable = isColumnSearchable(column)
|
||||||
|
$: resetSearchValue(column.name)
|
||||||
$: searching = searchValue != null
|
$: searching = searchValue != null
|
||||||
$: debouncedUpdateFilter(searchValue)
|
$: debouncedUpdateFilter(searchValue)
|
||||||
|
|
||||||
|
const resetSearchValue = name => {
|
||||||
|
searchValue = $inlineFilters?.find(x => x.id === `inline-${name}`)?.value
|
||||||
|
}
|
||||||
|
|
||||||
const isColumnSearchable = col => {
|
const isColumnSearchable = col => {
|
||||||
const { type, formulaType } = col.schema
|
const { type, formulaType } = col.schema
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue