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
feat(table): Add syncable sort-by and sort-desc props #742
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
334c233
feat(table): Add syncable sort-by and sort-desc props
tmorehouse 68c0eef
ESLint
tmorehouse 391a1e0
ESLint
tmorehouse 6020a7c
Remove unnecessary set of brackets
tmorehouse fc60b36
[table] Document sort-by and sort-desc props
tmorehouse a40531a
[table] Minor docs update
tmorehouse 296ba7c
[table] change .sync events to camelCase
tmorehouse efe5ff7
Change emitted prop to camelCase + some typo fix
mosinve c9d9d75
[table] docs add clear sort button to example
tmorehouse File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I removed a reset by clicking on non-sortable column, because it just set sortBy to
null
, but parametersort=null|<sortDesc>
still sending to backend API.On another tought, is may be up to Item provider func to deal with null sort target and remove it from query.
And on third thought, maybe better not expicitly to null
sortBy
, but reset it to default sortBy, defined at startup. If it not defined, then to null it.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.
Although some may want to clear the sort... but you never know. The original table (from before I started working on it) cleared the sort on a non-sortable column.
Some people may want to table to display in the order sent from the server (as not having a null sort by would case b-table to sort the data which is received).
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.
Yep, i think that this feature should be restored at my variant of
<b-table>
But it needs to be reviewed.
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.
I think, we can merge this branch, and i will continue to work on mine.
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.
OK cool... so everything looks OK in this branch?
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.
Mmm, Ill make a final test at local Playground doc, though
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.
OK good... The docs example should show the sort key and order under the table, using the
.sync
modifier.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.
Also, I could dd a button that says 'clear sort' (which is disabled if
sort-by
isnull
) to the example.Clicking on the button would set
sort-by
tonull
, and ifsort-by
isnull
then the button could be disabled. Sowing a bit more interactivity with with the table.