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

FDS-670 sorting issue with number column #273

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading