Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(BTable): add noSortReset option #1830

Closed
wants to merge 1 commit into from

Conversation

dnewkerk
Copy link
Contributor

Describe the PR

Implements the noSortReset option for BTable. When enabled, sorting by a field only toggles between ascending and descending, and the sortBy value is not reset.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 馃悰 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

Copy link

stackblitz bot commented Mar 27, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@VividLemon
Copy link
Member

This is actually something that I had added in my current branch. Which contains a few other changes to Table. So, I'm going to prioritize that over this. Thanks though

@VividLemon VividLemon closed this Apr 2, 2024
@VividLemon
Copy link
Member

Actually, I'm going to keep this around. I may have misinterpreted what this prop actually does. When 0.17 is added, I may need you to check this PR again

@VividLemon VividLemon reopened this Apr 2, 2024
@VividLemon
Copy link
Member

VividLemon commented Apr 2, 2024

Actually, the functionality from bootstrap-vue is close to what I have done already. However, it's not perfect. It's going to be a deprecated prop.

In bootstrap-vue, the no-sort-reset would only modify the sort state when you click on a column that is not sortable. Meaning that if the entire table is sortable, one could never "unsort" the items.

Instead, the functionality has changed. prop mustSort is going to do this, where if it's true, you could never (from the tables pov) unsort a column. If it's false, you can click to 'asc' -> 'desc' -> null (unsorted). In addition, one could make it an array (since it's multisortable) where you could say some fields are mustsort, while others aren't

(0.17 use prop :must-sort)

@VividLemon VividLemon closed this Apr 2, 2024
@VividLemon VividLemon mentioned this pull request Apr 2, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants