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.
Satisfies feature request:
After initial sort from config, columns can be sorted ascending/descending by clicking on column header. Order of other columns then becomes indeterminate.
Took the suggestion by @myhomeiot to use
ZHA Network Card
as an example. Code has diverged considerably since the original branch, but with modifications it was quite useful.When sorting via config, the user is responsible for making certain that any
sort_by
columns are configured properly; e.g., if anid
option is required because thedata
option of all columns is identical, then the user must provide anid
option for the sortable columns. However, in the case of column sorting, all visible columns must be sortable without any assistance from the user. For this reason, I have added thename
option as a value that could be used in thesort_by
list. While thename
option is not currently listed as being required by the config for columns, it is probably the most likely to be available consistently. It has been placed last in the list, following such options asid
anddata
.Would it be possible to make
name
a required option for columns going forward? It's a breaking change, but a simple one, and probably won't affect many users. In fact, I don't see why thename
value wouldn't be the preferred way to specify thesort_by
option, essentially rendering theid
field obsolete. It's quite useful if not necessary for naming columns, and should always be unique, I would think. Am I missing something?Anyway, this could use some testing with a wider variety of configurations than I can dream up, but I know of no issues other than a dependency on the
name
option.