From c1e6bdfaf7455a042fa6ce7e5981aff84f4ca99f Mon Sep 17 00:00:00 2001 From: tobiu Date: Tue, 14 Jan 2025 20:07:59 +0100 Subject: [PATCH] examples.grid.bigData.MainContainer: comboBox to change the new bufferColumnRange #6232 --- examples/grid/bigData/MainContainer.mjs | 32 ++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/examples/grid/bigData/MainContainer.mjs b/examples/grid/bigData/MainContainer.mjs index 832f0a4d9..93a4aef9c 100644 --- a/examples/grid/bigData/MainContainer.mjs +++ b/examples/grid/bigData/MainContainer.mjs @@ -49,12 +49,19 @@ class MainContainer extends Viewport { value : '50', width : 200 }, { - labelText : 'Buffer Row Range', - labelWidth: 140, + labelText : 'Buffer Rows', + labelWidth: 95, listeners : {change: 'up.ontBufferRowRangeChange'}, store : ['0', '3', '5', '10', '25', '50'], value : '5', - width : 200 + width : 160 + }, { + labelText : 'Buffer Columns', + labelWidth: 120, + listeners : {change: 'up.ontBufferColumnRangeChange'}, + store : ['0', '3', '5', '10', '20'], + value : '0', + width : 185 }] }, { module : GridContainer, @@ -73,12 +80,16 @@ class MainContainer extends Viewport { style: {padding: '20px'} } + get grid() { + return this.getItem('grid') + } + /** * @param {Object} data */ onAmountColumnsChange(data) { if (data.oldValue) { - this.getItem('grid').amountColumns = parseInt(data.value.id) + this.grid.amountColumns = parseInt(data.value.id) } } @@ -87,7 +98,16 @@ class MainContainer extends Viewport { */ onAmountRowsChange(data) { if (data.oldValue) { - this.getItem('grid').store.amountRows = parseInt(data.value.id) + this.grid.store.amountRows = parseInt(data.value.id) + } + } + + /** + * @param {Object} data + */ + ontBufferColumnRangeChange(data) { + if (data.oldValue) { + this.grid.view.bufferColumnRange = parseInt(data.value.id) } } @@ -96,7 +116,7 @@ class MainContainer extends Viewport { */ ontBufferRowRangeChange(data) { if (data.oldValue) { - this.getItem('grid').view.bufferRowRange = parseInt(data.value.id) + this.grid.view.bufferRowRange = parseInt(data.value.id) } } }