@alaarab/ogrid-vue 2.1.11 → 2.1.12
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.
- package/dist/esm/index.js +9 -5
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -3314,7 +3314,10 @@ function createDataGridTable(ui) {
|
|
|
3314
3314
|
visibleCols,
|
|
3315
3315
|
hasCheckboxCol,
|
|
3316
3316
|
hasRowNumbersCol,
|
|
3317
|
-
colOffset: _colOffset
|
|
3317
|
+
colOffset: _colOffset,
|
|
3318
|
+
containerWidth,
|
|
3319
|
+
minTableWidth,
|
|
3320
|
+
desiredTableWidth
|
|
3318
3321
|
} = layout;
|
|
3319
3322
|
const currentPage = p.currentPage ?? 1;
|
|
3320
3323
|
const pageSize = p.pageSize ?? 25;
|
|
@@ -3354,6 +3357,7 @@ function createDataGridTable(ui) {
|
|
|
3354
3357
|
const ariaLabel = p["aria-label"];
|
|
3355
3358
|
const ariaLabelledBy = p["aria-labelledby"];
|
|
3356
3359
|
const fitToContent = layoutMode === "content";
|
|
3360
|
+
const allowOverflowX = !suppressHorizontalScroll && containerWidth > 0 && (minTableWidth > containerWidth || desiredTableWidth > containerWidth);
|
|
3357
3361
|
const headerRows = headerRowsComputed.value;
|
|
3358
3362
|
const editCallbacks = { commitCellEdit, setEditingCell, setPendingEditorValue, cancelPopoverEdit };
|
|
3359
3363
|
const interactionHandlers = { handleCellMouseDown, setActiveCell, setEditingCell, handleCellContextMenu };
|
|
@@ -3450,7 +3454,7 @@ function createDataGridTable(ui) {
|
|
|
3450
3454
|
minHeight: isLoading && items.length === 0 ? "200px" : "0",
|
|
3451
3455
|
width: fitToContent ? "fit-content" : "100%",
|
|
3452
3456
|
maxWidth: "100%",
|
|
3453
|
-
overflowX: suppressHorizontalScroll ? "hidden" : "auto",
|
|
3457
|
+
overflowX: suppressHorizontalScroll ? "hidden" : allowOverflowX ? "auto" : "hidden",
|
|
3454
3458
|
overflowY: "auto",
|
|
3455
3459
|
backgroundColor: "#fff",
|
|
3456
3460
|
willChange: "scroll-position"
|
|
@@ -3472,11 +3476,11 @@ function createDataGridTable(ui) {
|
|
|
3472
3476
|
onMousedown: onWrapperMousedown,
|
|
3473
3477
|
onKeydown: handleGridKeyDown,
|
|
3474
3478
|
onContextmenu,
|
|
3475
|
-
"data-
|
|
3479
|
+
"data-overflow-x": allowOverflowX ? "true" : "false",
|
|
3476
3480
|
style: wrapperStyle
|
|
3477
3481
|
}, [
|
|
3478
3482
|
h("div", { class: "ogrid-scroll-wrapper" }, [
|
|
3479
|
-
h("div", { style: {
|
|
3483
|
+
h("div", { style: { minWidth: allowOverflowX ? `${minTableWidth}px` : void 0 } }, [
|
|
3480
3484
|
h("div", {
|
|
3481
3485
|
ref: (el) => {
|
|
3482
3486
|
tableContainerRef.value = el;
|
|
@@ -3497,7 +3501,7 @@ function createDataGridTable(ui) {
|
|
|
3497
3501
|
},
|
|
3498
3502
|
class: "ogrid-table",
|
|
3499
3503
|
role: "grid",
|
|
3500
|
-
style: {
|
|
3504
|
+
style: { minWidth: `${minTableWidth}px` }
|
|
3501
3505
|
}, [
|
|
3502
3506
|
// Header
|
|
3503
3507
|
h(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-vue",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"description": "OGrid Vue – Vue 3 composables, headless components, and utilities for OGrid data grids.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"node": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@alaarab/ogrid-core": "2.1.
|
|
39
|
+
"@alaarab/ogrid-core": "2.1.12"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vue": "^3.3.0"
|