-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: save table column order on setAll #200
Conversation
🦋 Changeset detectedLatest commit: ced9ca3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Preview URLsGH Env: preview |
53380c4
to
11eb4bc
Compare
a4f54f1
to
5595c9c
Compare
5595c9c
to
332a139
Compare
332a139
to
8fda789
Compare
.changeset/thin-sheep-warn.md
Outdated
@@ -0,0 +1,8 @@ | |||
--- | |||
"ember-headless-table": patch | |||
"test-app": patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test-app needs to be private 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated changeset
} | ||
} | ||
}, | ||
"ColumnVisibility": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why is ColumnVisibility
here? Was that set up from a previous test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because the tests in this module are set up with the Column Visibility plugin on line 376, and including that module adds the property to the preferences object
54653c0
to
ee5bcab
Compare
@nicolechung Code snippet added to documentation for Column Reordering. There is no setup required - the preferences object is automatically created when the plugin is included. It's up to the consuming app to handle where and how to save the provided object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me! To get a release you'll still want to do pnpm changeset
and select ember-headless-table
as the package to bump!
// @ts-expect-error | ||
setColumnOrder(ctx.table, order); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not being in this repo much:
Out of curiosity - why is this @ts-expect-error
required? Are we not supposed to be calling this directly? Adding a comment here for future travelers may be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it I get a TS error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setColumnOrder
is not usually called directly (it's in the helpers.ts
) so we're OK to ignore the TS error here.
.github/actions/pnpm/action.yml
Outdated
@@ -5,7 +5,7 @@ runs: | |||
steps: | |||
- uses: pnpm/[email protected] | |||
with: | |||
version: 7 | |||
version: 7.32.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why this update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #199
It's to address an issue around pnpm lock files
I didn't fully read this the first time (osrry, Monday morning) and left a suggestion and then re-read your comment and deleted it. Pretty neat that the preferences object is automatically created! |
enable re-ordered columns to be saved to preferences
ee5bcab
to
7d7d2ae
Compare
7d7d2ae
to
9d07304
Compare
enable re-ordered columns to be saved to preferences