diff --git a/packages/flow-table/CHANGELOG.md b/packages/flow-table/CHANGELOG.md index 071c68eaf..2ce2001e2 100644 --- a/packages/flow-table/CHANGELOG.md +++ b/packages/flow-table/CHANGELOG.md @@ -2,6 +2,12 @@ # Change Log +## [2.5.0] - 2024-07-08 + +### Minor Changes + +- `show-scrollbar` property added in `f-table-schema` + ## [2.4.8] - 2024-07-08 ### Patch Changes diff --git a/packages/flow-table/package.json b/packages/flow-table/package.json index a392727dd..2e045be9f 100644 --- a/packages/flow-table/package.json +++ b/packages/flow-table/package.json @@ -1,6 +1,6 @@ { "name": "@ollion/flow-table", - "version": "2.4.8", + "version": "2.5.0", "description": "Table component for flow library", "module": "dist/flow-table.es.js", "main": "dist/flow-table.cjs.js", diff --git a/packages/flow-table/src/components/f-table-schema/f-table-schema.scss b/packages/flow-table/src/components/f-table-schema/f-table-schema.scss index 34d1894d7..60818b6f7 100644 --- a/packages/flow-table/src/components/f-table-schema/f-table-schema.scss +++ b/packages/flow-table/src/components/f-table-schema/f-table-schema.scss @@ -9,5 +9,14 @@ flex: 1 1; overflow: auto; @include scrollbar(); + &[show-scrollbar] { + scrollbar-width: thin; + + &::-webkit-scrollbar { + display: block; + width: 6px; + height: 6px; + } + } } } diff --git a/packages/flow-table/src/components/f-table-schema/f-table-schema.ts b/packages/flow-table/src/components/f-table-schema/f-table-schema.ts index e3c041afb..b3a698a9f 100644 --- a/packages/flow-table/src/components/f-table-schema/f-table-schema.ts +++ b/packages/flow-table/src/components/f-table-schema/f-table-schema.ts @@ -182,6 +182,16 @@ export class FTableSchema extends FRoot { this.headerCellTemplate = val; } + /** + * to show scrollbar + */ + @property({ type: Boolean, reflect: true, attribute: "show-scrollbar" }) + showScrollbar = false; + + set ["show-scrollbar"](val: boolean) { + this.showScrollbar = val; + } + @state() offset = 0; @@ -466,7 +476,7 @@ export class FTableSchema extends FRoot { ` : nothing} -