Skip to content
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

Add displayAsText props to EuiDataGridColumn #3520

Merged
merged 14 commits into from
Jun 2, 2020

Conversation

ashikmeerankutty
Copy link
Contributor

@ashikmeerankutty ashikmeerankutty commented May 28, 2020

Summary

Fixes #3421

Added a displayAsText prop that will be shown in column popover and sorting popover of EuiDataGrid.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
    - [ ] Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation examples
    - [ ] Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@ashikmeerankutty ashikmeerankutty changed the title Add displayAsText props to column type of EuiDataGrid Add displayAsText props to EuiDataGridColumn May 28, 2020
@chandlerprall chandlerprall self-requested a review June 1, 2020 18:48
@ashikmeerankutty
Copy link
Contributor Author

@chandlerprall Thanks for the suggestions. Changes committed 👍

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM; Pulled and tested locally, will merge on green CI

@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3520/

@chandlerprall chandlerprall merged commit d0c497b into elastic:master Jun 2, 2020
daveyholler pushed a commit to daveyholler/eui that referenced this pull request Jun 3, 2020
* Add displayAsText props to column type

* Column selector must show dispalyAsTest if it exists

* Use displayAsText instead of id

* Add displayAsText to EuiDataGridSorting interface

* Added example in docs

* Add cl

* Rever changes

* Removed display as test

* Updated info of props

* Use displayValues to get displayAsText from id

* Move displayValues to data grid

* Updated comment
@timroes
Copy link
Contributor

timroes commented Jun 7, 2020

@ashikmeerankutty This PR missed applying displayAsText in one place. While it correctly shows in the Columns sorting/hiding popover and the "pick a field" popover in the sorting popover, it's not using the value inside the sorting popover itself, when you sort by that field:

screenshot-20200607-234754

name and latestPrice are still the id of the column.

cc @chandlerprall

@ashikmeerankutty
Copy link
Contributor Author

@timroes Sorry I missed that. I was aware of this issue while creating this PR but I missed to comment about it.
The issue is that EuiDataGridColumnSortingDraggable is using id passed to it as the value inside popover. In this case should I create another prop for EuiDataGridColumnSortingDraggable to set the value

<EuiDataGridColumnSortingDraggable
key={id}
id={id}

@timroes
Copy link
Contributor

timroes commented Jun 8, 2020

Yes that sounds right. And then we can just pass the display as string value to the too.

@ashikmeerankutty
Copy link
Contributor Author

Yes that sounds right. And then we can just pass the display as string value to the too.

I will make a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EuiDataGrid] Columns popover should not only show ids
4 participants