ember-headless-table icon indicating copy to clipboard operation
ember-headless-table copied to clipboard

fix: Use generic column types in resize-handle and data-sorting plugins (#247)

Open johanrd opened this issue 1 year ago • 2 comments

Proposed fix for #247 for Resize-handle and data-sorting

johanrd avatar Feb 21 '24 12:02 johanrd

⚠️ No Changeset found

Latest commit: e26a127904874eb1dfbd3622b91b6ba25fb7285a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Feb 21 '24 12:02 changeset-bot[bot]

I had to wait with the sort, sortDescending and sortAscending helpers:

https://github.com/CrowdStrike/ember-headless-table/blob/8111252521665b76957bf3741678f0a8d6e5b10e/ember-headless-table/src/plugins/data-sorting/helpers.ts#L38-L50

For some reason, I didn't get the generics to work for the meta.forTable(column.table, Sorting).handleSort(column) (reverted here: https://github.com/CrowdStrike/ember-headless-table/pull/248/commits/10a9e268dc6df4e2ae12fd844b5379f74baff1b7, see failing test: https://github.com/CrowdStrike/ember-headless-table/actions/runs/7989097110/job/21815050164?pr=248#step:4:67

@NullVoxPopuli perhaps you know how to pass on the generic Column<DataType> through meta.forTable? thanks,

johanrd avatar Feb 21 '24 14:02 johanrd