-
Notifications
You must be signed in to change notification settings - Fork 55
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
implements explorer data grid column reordering #1221
base: main
Are you sure you want to change the base?
implements explorer data grid column reordering #1221
Conversation
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1221 +/- ##
==========================================
- Coverage 44.07% 44.05% -0.03%
==========================================
Files 329 329
Lines 19668 19690 +22
Branches 4735 4690 -45
==========================================
+ Hits 8669 8674 +5
- Misses 10422 10971 +549
+ Partials 577 45 -532
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
public/components/event_analytics/explorer/events_views/data_grid.tsx
Outdated
Show resolved
Hide resolved
@@ -262,7 +283,7 @@ export function DataGrid(props: DataGridProps) { | |||
toolbarVisibility={{ | |||
showColumnSelector: { | |||
allowHide: false, | |||
allowReorder: true, | |||
allowReorder: explorerFields.selectedFields.length > 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.
If by default only have timestamp and _source for initial state, then there's no selected field explorerFields.selectedFields, but datagrid should still allow user to reorder timnestamp and _source is it?
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.
Here i'm actually disabling reordering when no fields are selected, so that no reordering is done when the default columns appear in data grid. The reason I do this is because the default columns are 'artificial fields' and I don't want them to appear as objects in the sidebar.
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.
then it doesn't match with existing behavior in discover
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.
existing behavior is discover is bugged a little bit, the default columns don't get reordered when done through the data grid even though the names move and the sidebar also has some inconsistencies. I extrapolated that since the default columns don't actually move themselves, then I should disable the ability to attempt at doing so.
Signed-off-by: Paul Sebastian <[email protected]>
e87712d
to
bcf7cb0
Compare
Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: Paul Sebastian <[email protected]>
@paulstn please resolve the conflicts |
* Increment Version to 2.5.0 and add web driver for selenium test case Signed-off-by: Ryan Liang <[email protected]>
Description
Implements data grid column reordering within the column toolbar drag and drop. Also implements it within the sidebar fields drag and drop, where the order of the selected fields can be manipulated but the available fields will still be sorted alphabetically.
Issues Resolved
This PR also resolves an issue within app analytics where the sidebar isn't populated with any fields.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.