diff --git a/packages/flow-table/CHANGELOG.md b/packages/flow-table/CHANGELOG.md index b87b815a0..b1689d992 100644 --- a/packages/flow-table/CHANGELOG.md +++ b/packages/flow-table/CHANGELOG.md @@ -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 diff --git a/packages/flow-table/package.json b/packages/flow-table/package.json index 3967cd1e7..962e3007f 100644 --- a/packages/flow-table/package.json +++ b/packages/flow-table/package.json @@ -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", 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 dc968a172..40a6e55a0 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 @@ -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) @@ -442,7 +442,7 @@ export class FTableSchema extends FRoot { ? html`