Skip to content

Commit

Permalink
Sticky 1st Column
Browse files Browse the repository at this point in the history
  • Loading branch information
poirazis committed Aug 14, 2024
1 parent ef78853 commit 240a96e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"svelte-legos": "^0.2.3"
},
"devDependencies": {
"@budibase/backend-core": "^2.29.28",
"@budibase/bbui": "^2.29.28",
"@budibase/frontend-core": "^2.29.28",
"@budibase/shared-core": "^2.29.28",
"@budibase/backend-core": "^2.30.3",
"@budibase/bbui": "^2.30.3",
"@budibase/frontend-core": "^2.30.3",
"@budibase/shared-core": "^2.30.3",
"@rollup/plugin-commonjs": "^25.0.8",
"@rollup/plugin-image": "^3.0.3",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@spectrum-css/actionbar": "6.0.65",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.40",
"postcss": "^8.4.41",
"rollup": "^2.79.1",
"rollup-plugin-copy2": "^0.3.1",
"rollup-plugin-polyfill-node": "^0.8.0",
Expand Down
52 changes: 21 additions & 31 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@
"type": "select",
"key": "canInsert",
"label": "Add Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Add Row",
"options": [
{ "label": "Off", "value": false, "barIcon": "Add" },
{
Expand All @@ -259,9 +256,6 @@
"dependsOn": "isTable",
"key": "canEdit",
"label": "Edit Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Editing",
"options": [
{
"label": "Off",
Expand All @@ -281,9 +275,6 @@
"type": "select",
"key": "canDelete",
"label": "Delete Row",
"showInBar": true,
"barStyle": "buttons",
"barTitle": "Delete Row",
"options": [
{ "label": "Off", "value": false, "barIcon": "DeleteOutline" },
{ "label": "Direct", "value": "simple", "barIcon": "FlashAuto" },
Expand Down Expand Up @@ -355,12 +346,33 @@
"label": "Resize Columns",
"defaultValue": true
},
{
"type": "boolean",
"key": "numberingColumn",
"label": "Numbering",
"showInBar": true,
"barStyle": "buttons",
"barIcon": "123",
"barTitle": "Numbering",
"defaultValue": true
},
{
"type": "boolean",
"key": "selectionColumn",
"label": "Selection Column",
"dependsOn": "rowSelectMode",
"resetOn": "rowSelectMode",
"defaultValue": true
},
{
"type": "boolean",
"key": "stickFirstColumn",
"label": "Pin 1st Column",
"showInBar": true,
"barStyle": "buttons",
"barIcon": "PinOff",
"barTitle": "Pin 1st Column",
"defaultValue": false
}
]
},
Expand All @@ -379,28 +391,6 @@
],
"defaultValue": false
},
{
"type": "select",
"key": "rowMenuPosition",
"label": "Menu Position",
"barStyle": "buttons",
"dependsOn": "rowMenu",
"options": [
{
"label": "First",
"value": "first",
"barIcon": "PaddingLeft",
"barTitle": "First"
},
{
"label": "Last",
"value": "last",
"barIcon": "PaddingRight",
"barTitle": "Last"
}
],
"defaultValue": "first"
},
{
"dependsOn": "rowMenu",
"type": "icon",
Expand Down
14 changes: 13 additions & 1 deletion src/Component.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
export let preselectedIds;
export let selectionColumn;
export let selectionLimit;
export let numberingColumn = true;
export let stickFirstColumn = false;
export let columnSizing = "flex";
export let columnMinWidth = "6rem";
export let columnMaxWidth = "auto";
export let columnFixedWidth = "6rem";
export let columnFixedWidth = "8rem";
export let headerFontSize, headerColor, headerBgColor, headerAlign;
export let dividers, dividersColor;
Expand Down Expand Up @@ -91,6 +93,14 @@
) {
builderStore.actions.updateProp("isTable", localIsTable);
}
$: $component.styles = {
...$component.styles,
normal: {
width: "100%",
overflow: "hidden",
},
};
</script>

<div use:styleable={$component.styles}>
Expand Down Expand Up @@ -168,6 +178,8 @@
{onInsert}
{onDelete}
{onEdit}
{numberingColumn}
{stickFirstColumn}
>
<slot />
</SuperTable>
Expand Down

0 comments on commit 240a96e

Please sign in to comment.