Get all possible filters from backend

This commit is contained in:
2022-10-11 23:15:52 +03:00
parent 97ad29ade0
commit be79d178ff
2 changed files with 14 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ export default {
enableCellChangeFlash: true
},
currentRowCount: 0,
comboBoxOptions: {},
viewRowCount: 20,
comboBoxOptions: [],
columnDefs: [
@@ -88,6 +89,7 @@ export default {
setupStream() {
let es = new EventSource('/events');
es.onmessage = (e) => this.handleReceiveMessage(e)
es.addEventListener("filters", (e) => this.handleReceiveFilters(e))
},
onGridReady(params) {
this.gridApi = params.api;
@@ -102,6 +104,9 @@ export default {
this.gridApi.flashCells({ rowNodes: [rowNode]});
this.gridApi.sizeColumnsToFit()
},
handleReceiveFilters (event) {
this.comboBoxOptions = this.parseEventData(event.data);
},
parseEventData (eventData) {
try {
let json = JSON.parse(eventData)