Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
FDS-670 sorting issue with number column (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr authored May 20, 2024
1 parent 3b94874 commit 21c10b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/flow-table/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Change Log

## [2.4.5] - 2024-05-20

### Bug Fixes

- Sorting issue for number column in `f-table-schema`

## [2.4.4] - 2024-05-17

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ollion/flow-table",
"version": "2.4.4",
"version": "2.4.5",
"description": "Table component for flow library",
"module": "dist/flow-table.es.js",
"main": "dist/flow-table.cjs.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export class FTableSchema extends FRoot {
}
return 0;
} else if (typeof columnA === "number" && typeof columnB === "number") {
return this.sortOrder === "asc" ? columnB - columnA : columnA - columnB;
return this.sortOrder === "asc" ? columnA - columnB : columnB - columnA;
} else if (columnA instanceof Date && columnB instanceof Date) {
return this.sortOrder === "asc"
? (columnA as any) - (columnB as any)
Expand Down Expand Up @@ -442,7 +442,7 @@ export class FTableSchema extends FRoot {
? html`<f-div
padding="medium none"
style="position: sticky;left: 0px;z-index:3;"
.width=${this.offsetWidth + "px"}
.width=${this.offsetWidth ? `${this.offsetWidth}px` : `100%`}
>
<f-search
.scope=${["all", ...Object.keys(this.data.header)]}
Expand Down

0 comments on commit 21c10b5

Please sign in to comment.