-
Notifications
You must be signed in to change notification settings - Fork 916
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
[BUG] [Data Explorer] Modify columns on switch #5268
Comments
What is the purpose of this switch? |
May I work on this issue? Ty. |
The workflow of how the fields are updated in the left side nav:in the use effect, when a new indexPattern is selected, all the variables (fields, selected, unpopular, popular) used for rendering the elements in the left sidebar will get updated Lines 125 to 135 in 7def75c
we care most about the state of fields and columns(columns refers to the selected fields) because if MODIFY_COLUMN_ON_SWITCH is off, we want them to keep the fields & selected columns from the previously chosen data sample(indexPattern) The state of fields gets modified here: function'getIndexPatternFieldList generates fields` Lines 104 to 107 in 7def75c
The state of columns gets modified here everytime the indexPattern is changed to a new one: OpenSearch-Dashboards/src/plugins/discover/public/application/view_components/canvas/index.tsx Lines 31 to 38 in 791210d
OpenSearch-Dashboards/src/plugins/discover/public/application/view_components/canvas/index.tsx Lines 83 to 89 in 791210d
Proposed solutionIf we want to implement MODIFY_COLUMNS_ON_SWITCH, we just need to add in conditioning in the function'getIndexPatternFieldList generates fields |
One user story I could think about is that user has some similar index pattern, with most fields same but 1-2 key fields diff. When they nav from one index pattern to another one, they would like to keep all fields even though some of them will be grey. So they could know what index pattern they are using without distinguishing the index pattern name. |
@MadaniKK since we have go through the workflow today, could you help us add a clear summary on
Thanks~ ❤️ |
Updated the workflow |
closed it as it is resolved in #5508 |
Describe the bug
Advanced setting
discover:modifyColumnsOnSwitch
does not work for the new data explorer.To Reproduce
Screen.Recording.2023-10-10.at.12.31.03.PM.mov
Expected behavior
When the setting
discover:modifyColumnsOnSwitch
is turned off, the columns from the previous index pattern should not be automatically cleared.Screen.Recording.2023-10-10.at.12.33.58.PM.mov
The text was updated successfully, but these errors were encountered: