From 18a717bc55cf39fee327a7864703b40486bba638 Mon Sep 17 00:00:00 2001 From: tobiu Date: Thu, 6 Feb 2025 23:45:24 +0100 Subject: [PATCH] grid.View: create a PoC to have the vertical scrollbar at the right edge of the wrapper container #6235 first try --- resources/scss/src/grid/Container.scss | 16 ++++++++++------ src/grid/Container.mjs | 11 ++++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/scss/src/grid/Container.scss b/resources/scss/src/grid/Container.scss index 1c3cc53a2..ff83ce373 100644 --- a/resources/scss/src/grid/Container.scss +++ b/resources/scss/src/grid/Container.scss @@ -4,6 +4,16 @@ overflow-y : hidden; overscroll-behavior: none; position : relative; + + .neo-grid-scrollbar { + background-color: red; + bottom : 0; + position : absolute; + right : 0; + top : 31px; // header-toolbar height + width : 16px; + z-index : 2; + } } .neo-grid-container { @@ -28,12 +38,6 @@ z-index : 10; } - .neo-grid-body { - display : block; - max-height: 300px; // an initial dummy value to reduce the flickering until the real height is available - overflow-y: scroll; - } - .neo-grid-row:last-child { .neo-grid-cell { border-bottom-width: 0 !important; diff --git a/src/grid/Container.mjs b/src/grid/Container.mjs index 5583bc3ed..674b1f862 100644 --- a/src/grid/Container.mjs +++ b/src/grid/Container.mjs @@ -102,7 +102,10 @@ class GridContainer extends BaseContainer { */ _vdom: {cls: ['neo-grid-wrapper'], cn: [ - {'aria-rowcount': 1, cn: []} // aria-rowcount includes the column headers + {'aria-rowcount': 1, cn: []}, // aria-rowcount includes the column headers + {cls: ['neo-grid-scrollbar'], cn: [ + {cls: ['neo-grid-scrollbar-content']} + ]} ]} } @@ -147,8 +150,10 @@ class GridContainer extends BaseContainer { sortable : me.sortable, ...me.headerToolbarConfig }, { - module: GridView, - id : me.viewId, + module : GridView, + flex : 1, + gridContainer: me, + id : me.viewId, rowHeight, store, ...me.viewConfig