-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
enhance(admin): persist entities when changing the chart type #2702
Conversation
if (entity) selection.setSelectedEntities([entity]) | ||
// non-stacked charts with multiple y-dimensions should select a single entity by default. | ||
// if possible, the currently selected entity is persisted, otherwise "World" is preferred | ||
if (selection.numSelectedEntities !== 1) { |
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.
We could also pick the first entity if multiple entities are currently selected
adminSiteClient/EditorBasicTab.tsx
Outdated
) | ||
// stacked charts or charts with a single y-dimension should select multiple entities by default. | ||
// if possible, the currently selected entities are persisted, otherwise a random sample is selected | ||
if (selection.numSelectedEntities === 0) { |
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.
What if the numSelectedEntities
is 1? I've chosen to persist it but we could also sample additional entities...
This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected. |
50341f2
to
a5d47b3
Compare
it's a low risk change, so I'll just merge this in now :) |
Problem
Solution