From 8b03c25512c6e5dad5c032505a4a24287f7df726 Mon Sep 17 00:00:00 2001
From: Vikas Awaghade <67629551+vikas-cldcvr@users.noreply.github.com>
Date: Thu, 9 May 2024 12:08:33 +0530
Subject: [PATCH] FDS-667 infinite scroll bug fixed (#270)
* FDS-667 infinite scroll bug fixed
* FDS-667 search bar width fixed
* FDS-667 search bar made stikcy
---
packages/flow-table/CHANGELOG.md | 11 +++
packages/flow-table/package.json | 2 +-
.../f-table-schema/f-table-schema-global.scss | 1 +
.../f-table-schema/f-table-schema.scss | 6 +-
.../f-table-schema/f-table-schema.ts | 76 +++++++++++++------
stories/flow-table/f-table-schema.stories.ts | 10 ++-
6 files changed, 78 insertions(+), 28 deletions(-)
diff --git a/packages/flow-table/CHANGELOG.md b/packages/flow-table/CHANGELOG.md
index 5f766b553..7feddce3e 100644
--- a/packages/flow-table/CHANGELOG.md
+++ b/packages/flow-table/CHANGELOG.md
@@ -2,6 +2,17 @@
# Change Log
+## [2.4.3] - 2024-05-03
+
+### Improvements
+
+- Made the search bar sticky.
+- Implemented a loader for infinite scroll.
+
+### Bug Fixes
+
+- `f-table-schema` infinie scroll issue fixed.
+
## [2.4.2] - 2024-03-20
### Bug Fixes
diff --git a/packages/flow-table/package.json b/packages/flow-table/package.json
index 075f44568..0c34cd596 100644
--- a/packages/flow-table/package.json
+++ b/packages/flow-table/package.json
@@ -1,6 +1,6 @@
{
"name": "@ollion/flow-table",
- "version": "2.4.2",
+ "version": "2.4.3",
"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-global.scss b/packages/flow-table/src/components/f-table-schema/f-table-schema-global.scss
index 0ae48cd55..b2bb1e90a 100644
--- a/packages/flow-table/src/components/f-table-schema/f-table-schema-global.scss
+++ b/packages/flow-table/src/components/f-table-schema/f-table-schema-global.scss
@@ -6,6 +6,7 @@ f-table-schema {
max-width: 100%;
display: flex;
overflow: auto;
+ flex-direction: column;
}
f-div[direction="column"] {
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 162baeb54..34d1894d7 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
@@ -1,9 +1,13 @@
+@import "../../../../flow-core/src/mixins/scss/mixins";
+
:host {
f-table {
height: fit-content;
width: 100%;
}
> div.f-table-schema-wrapper {
- flex: 1 1 auto;
+ flex: 1 1;
+ overflow: auto;
+ @include scrollbar();
}
}
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 1d4e8be05..60a564414 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
@@ -188,9 +188,15 @@ export class FTableSchema extends FRoot {
@query("f-div.load-more")
loadMoreButton?: FDiv;
+ @query("#pagination-loader")
+ paginationLoader!: FDiv;
+
@query("#f-table-element")
tableElement?: FTable;
+ @query(".f-table-schema-wrapper")
+ fTableWrapper!: HTMLDivElement;
+
nextEmitted = false;
get max() {
@@ -431,20 +437,24 @@ export class FTableSchema extends FRoot {
return html`