Skip to content
Snippets Groups Projects
Commit 9184eb83 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-12024 : Table Widget : Global filter with AND/OR options (as in the old...

SSDM-12024 : Table Widget : Global filter with AND/OR options (as in the old grid) - also use a quiet period before reloading a local grid
parent 48cacb0b
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,8 @@ import GridPagingOptions from '@src/js/components/common/grid/GridPagingOptions. ...@@ -8,7 +8,8 @@ import GridPagingOptions from '@src/js/components/common/grid/GridPagingOptions.
import GridSortingOptions from '@src/js/components/common/grid/GridSortingOptions.js' import GridSortingOptions from '@src/js/components/common/grid/GridSortingOptions.js'
import compare from '@src/js/common/compare.js' import compare from '@src/js/common/compare.js'
const FILTER_RELOAD_PERIOD = 500 const LOCAL_GRID_RELOAD_PERIOD = 200
const REMOTE_GRID_RELOAD_PERIOD = 500
export default class GridController { export default class GridController {
constructor() { constructor() {
...@@ -715,13 +716,12 @@ export default class GridController { ...@@ -715,13 +716,12 @@ export default class GridController {
this.loadTimerId = null this.loadTimerId = null
} }
if (local) { this.loadTimerId = setTimeout(
await this.load() async () => {
} else {
this.loadTimerId = setTimeout(async () => {
await this.load() await this.load()
}, FILTER_RELOAD_PERIOD) },
} local ? LOCAL_GRID_RELOAD_PERIOD : REMOTE_GRID_RELOAD_PERIOD
)
} }
async handleGlobalFilterChange(globalFilter) { async handleGlobalFilterChange(globalFilter) {
...@@ -737,13 +737,12 @@ export default class GridController { ...@@ -737,13 +737,12 @@ export default class GridController {
this.loadTimerId = null this.loadTimerId = null
} }
if (local) { this.loadTimerId = setTimeout(
await this.load() async () => {
} else {
this.loadTimerId = setTimeout(async () => {
await this.load() await this.load()
}, FILTER_RELOAD_PERIOD) },
} local ? LOCAL_GRID_RELOAD_PERIOD : REMOTE_GRID_RELOAD_PERIOD
)
} }
async handleColumnVisibleChange(name) { async handleColumnVisibleChange(name) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment