Tabpane: support persistence of all active tabs #1611
Merged
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.
persist=disabled
(instead ofoff
)persist=disabled
), rather than just the last activated tabbutton.onclick
in favor ofclick
event handlers.Handling of non-uniform shared tabs
Assume that a page contains three tabpanes with the following distribution of tabs A, B, C, D -- where these letters represent the tab-persistence keys:
If you activate tab B from any tabpane, it will become active in all three tabs and the selection will be persisted. If you then select C, then tab C will become active in tabpane 3, but tab panes 1 and 2 will remain active at B -- and these settings are persisted. If you then select A, then: tabpanes 1 and 3 become active at A, but tabpane 2 remains unchanged.
IMHO, this applies the principle of least surprise.
Preview and tests
yaml
and refresh the page. You'll see that the choice of language persists in this page and is active in other pages with the same tab-persistence keyyaml
persistence is still active.Other