diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/DataVizBox/components/TableBox.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx index a0d8ecc6f..26e1eeeff 100644 --- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx +++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx @@ -185,6 +185,13 @@ export class TableBox extends ObservableReactComponent<TableBoxProps> { */ @undoBatch filter = (e: any) => { + var start: any; + var end: any; + if (this.filteringType=="Range"){ + start = (this.filteringVal[0] as Number)? Number(this.filteringVal[0]): this.filteringVal[0] + end = (this.filteringVal[1] as Number)? Number(this.filteringVal[1]): this.filteringVal[0] + } + this._tableDataIds.forEach(rowID => { if (this.filteringType=="Value"){ if (this._props.records[rowID][this.filteringColumn]==this.filteringVal[0]) { @@ -194,7 +201,9 @@ export class TableBox extends ObservableReactComponent<TableBoxProps> { } } else { - if (this.filteringVal[0]<=this._props.records[rowID][this.filteringColumn] && this._props.records[rowID][this.filteringColumn]<=this.filteringVal[1]){ + let compare = this._props.records[rowID][this.filteringColumn] + if (compare as Number) compare = Number(compare) + if (start<=compare && compare<=end){ if (!NumListCast(this._props.layoutDoc.dataViz_selectedRows).includes(rowID)) { this.tableRowClick(e, rowID); } @@ -281,7 +290,7 @@ export class TableBox extends ObservableReactComponent<TableBoxProps> { }}> <div className="tableBox-selectButtons"> <div className="tableBox-selectTitle"> - <Button onClick={action(() => (this.settingTitle = !this.settingTitle))} text="Select Title Column" tooltip="TOOLTIP TEST YAY" type={Type.SEC} color={'black'} /> + <Button onClick={action(() => (this.settingTitle = !this.settingTitle))} text="Select Title Column" type={Type.SEC} color={'black'} /> </div> <div className="tableBox-filtering"> {this.filtering? this.renderFiltering : null} |