@yuneta/gobj-ui 7.23.41 → 7.23.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23218,14 +23218,14 @@ function build_ui$5(gobj) {
23218
23218
  "div",
23219
23219
  {
23220
23220
  class: "C_YUI_TREEDB_TOPIC_WITH_FORM",
23221
- style: "height:100%;"
23221
+ style: "height:100%; min-height:0; display:flex; flex-direction:column;"
23222
23222
  },
23223
23223
  [["div", {
23224
23224
  class: "TREEDB_TABLE_TOOLBAR toolbar_tabulator_table m-1",
23225
- style: "display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;"
23225
+ style: "flex:none; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;"
23226
23226
  }], ["div", {
23227
23227
  id: `${table_id}`,
23228
- style: "margin-top:0px !important;"
23228
+ style: "margin-top:0px !important; flex:1 1 auto; min-height:0;"
23229
23229
  }]]
23230
23230
  ]);
23231
23231
  if ((0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_checkbox") && (0, _yuneta_gobj_js.gobj_read_bool_attr)(gobj, "with_selection_bar")) {
@@ -23235,6 +23235,7 @@ function build_ui$5(gobj) {
23235
23235
  on_clear: () => (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_CLEAR_SELECTION", {}, gobj)
23236
23236
  });
23237
23237
  (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "selection_bar", bar);
23238
+ bar.$el.style.flex = "none";
23238
23239
  $container.insertBefore(bar.$el, $container.querySelector(`#${table_id}`));
23239
23240
  }
23240
23241
  let $toolbar_slot = $container.querySelector(".toolbar_tabulator_table");
@@ -23213,14 +23213,14 @@ function build_ui$5(gobj) {
23213
23213
  "div",
23214
23214
  {
23215
23215
  class: "C_YUI_TREEDB_TOPIC_WITH_FORM",
23216
- style: "height:100%;"
23216
+ style: "height:100%; min-height:0; display:flex; flex-direction:column;"
23217
23217
  },
23218
23218
  [["div", {
23219
23219
  class: "TREEDB_TABLE_TOOLBAR toolbar_tabulator_table m-1",
23220
- style: "display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;"
23220
+ style: "flex:none; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;"
23221
23221
  }], ["div", {
23222
23222
  id: `${table_id}`,
23223
- style: "margin-top:0px !important;"
23223
+ style: "margin-top:0px !important; flex:1 1 auto; min-height:0;"
23224
23224
  }]]
23225
23225
  ]);
23226
23226
  if (gobj_read_bool_attr(gobj, "with_checkbox") && gobj_read_bool_attr(gobj, "with_selection_bar")) {
@@ -23230,6 +23230,7 @@ function build_ui$5(gobj) {
23230
23230
  on_clear: () => gobj_send_event(gobj, "EV_CLEAR_SELECTION", {}, gobj)
23231
23231
  });
23232
23232
  gobj_write_attr(gobj, "selection_bar", bar);
23233
+ bar.$el.style.flex = "none";
23233
23234
  $container.insertBefore(bar.$el, $container.querySelector(`#${table_id}`));
23234
23235
  }
23235
23236
  let $toolbar_slot = $container.querySelector(".toolbar_tabulator_table");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.41",
3
+ "version": "7.23.42",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -759,13 +759,33 @@ function build_ui(gobj)
759
759
  * Layout Schema
760
760
  *----------------------------------------------*/
761
761
  let table_id = gobj_read_str_attr(gobj, "table_id");
762
+ /*
763
+ * A FLEX COLUMN, and that is the whole point of this block.
764
+ *
765
+ * It used to be a plain `height:100%` box with the toolbar and the
766
+ * table stacked inside it. The toolbar took its natural height and the
767
+ * table asked for `maxHeight: 100%` -- 100% of the CONTAINER, not of
768
+ * what the toolbar left -- so the box overflowed by exactly the height
769
+ * of the toolbar. The parent scrolls (`overflow:auto`), so the page
770
+ * ended up with TWO scrolls, and what fell off the bottom was the
771
+ * table's own footer: the row count and the paginator. Scrolling the
772
+ * outer one to reach them pushed the toolbar out of sight instead.
773
+ *
774
+ * As a column with the chrome at `flex:none` and the table at
775
+ * `flex:1 1 auto; min-height:0`, the table is sized to the space that
776
+ * is actually left, its footer stays put, and the only thing that
777
+ * scrolls is the rows -- which is the one scroll a table should have.
778
+ */
762
779
  let $container = createElement2(
763
- ['div', {class: 'C_YUI_TREEDB_TOPIC_WITH_FORM', style: 'height:100%;'}, [
764
- ['div', {class: 'TREEDB_TABLE_TOOLBAR toolbar_tabulator_table m-1', style: 'display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap;'}],
780
+ ['div', {class: 'C_YUI_TREEDB_TOPIC_WITH_FORM',
781
+ style: 'height:100%; min-height:0; display:flex; flex-direction:column;'}, [
782
+ ['div', {class: 'TREEDB_TABLE_TOOLBAR toolbar_tabulator_table m-1',
783
+ style: 'flex:none; display:flex; justify-content:space-between; ' +
784
+ 'align-items:center; flex-wrap:wrap;'}],
765
785
  ['div',
766
786
  {
767
787
  id: `${table_id}`,
768
- style: 'margin-top:0px !important;',
788
+ style: 'margin-top:0px !important; flex:1 1 auto; min-height:0;',
769
789
  }
770
790
  ]
771
791
  ]]
@@ -782,6 +802,8 @@ function build_ui(gobj)
782
802
  on_clear: () => gobj_send_event(gobj, "EV_CLEAR_SELECTION", {}, gobj)
783
803
  });
784
804
  gobj_write_attr(gobj, "selection_bar", bar);
805
+ /* Chrome too: it must not take height from the rows. */
806
+ bar.$el.style.flex = "none";
785
807
  $container.insertBefore(bar.$el, $container.querySelector(`#${table_id}`));
786
808
  }
787
809