-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Table persistent state #5953
Table persistent state #5953
Conversation
One thing I noticed: if you freshly load a saved visualization, the save button is disabled (presumably because there are no changes to save). However, changing the sort of the data table does not re-enable the save button. |
Can you make sure the existing tests are updated to reflect these changes? I didn't check every file, but for example, paginated_table.js does have tests that can be updated with the added behaviors. |
@epixa The spy panel also when loaded doesn't affect the save button when changed however, i would say this is a bug, we solve in another PR. I addressed your other concerns regarding tests. |
Sounds good |
LGTM |
c906e7e
to
902d96f
Compare
902d96f
to
b68bde7
Compare
jenkins, test it |
This needs to be rebased on master or have master merged into it. |
Test failure. Looks like you need to import lodash into that file. |
9b5739f
to
6aec0e4
Compare
@@ -116,6 +116,7 @@ uiModules | |||
}; | |||
|
|||
$state = new AppState(stateDefaults); | |||
$scope.uiState = $state.makeStateful('uiState'); |
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.
This line is not necessary.
https://github.com/elastic/kibana/pull/5953/files#diff-eaa764287bd619662df5d1a5d17486a1R142
}; | ||
function valueGetter(row) { | ||
let value = row[self.sort.columnIndex]; | ||
if (value && value.value != null) value = value.value; |
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.
Should this be !==
or are you intentionally checking for null-like instead of null?
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.
That is intentional. All I was attempting to do was move the above code into something simpler since it seems it was never used.
If the |
Thanks @epixa! I'll pass it to someone else to take a look at as well. |
@panda01 merge master then assign this to me |
Added column sorting persistent state to the tables.
This affects all of the paginated_tables in kibana, and they should all be checked to make sure they work as expected.
You should make a visualization with multiple tables and check to make sure that all of the sorting stays in sync.
You should check that sorting in the field list in settings, and on discover works as expected.
closes #3721.