mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Use individual choices for filtering choice lists
Test Plan: Wrote unit and browser tests that verify new behavior. Reviewers: paulfitz, dsagal Reviewed By: dsagal Subscribers: alexmojaki Differential Revision: https://phab.getgrist.com/D2855
This commit is contained in:
@@ -24,7 +24,7 @@ export class ColumnFilter extends Disposable {
|
||||
private _include: boolean;
|
||||
private _values: Set<CellValue>;
|
||||
|
||||
constructor(private _initialFilterJson: string) {
|
||||
constructor(private _initialFilterJson: string, private _columnType?: string) {
|
||||
super();
|
||||
this.setState(_initialFilterJson);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ export class ColumnFilter extends Disposable {
|
||||
}
|
||||
|
||||
private _updateState(): void {
|
||||
this.filterFunc.set(makeFilterFunc(this._getState()));
|
||||
this.filterFunc.set(makeFilterFunc(this._getState(), this._columnType));
|
||||
}
|
||||
|
||||
private _getState(): FilterState {
|
||||
|
||||
@@ -36,7 +36,7 @@ export class SectionFilter extends Disposable {
|
||||
const funcs: Array<RowFilterFunc<RowId> | null> = fields.map(f => {
|
||||
const filterFunc = (openFilter && openFilter.fieldRef === f.getRowId()) ?
|
||||
use(openFilter.colFilter.filterFunc) :
|
||||
buildColFilter(use(f.activeFilter));
|
||||
buildColFilter(use(f.activeFilter), use(f.column).type());
|
||||
|
||||
const getter = tableData.getRowPropFunc(use(f.colId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user