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 SelectPopover component #4619

Merged
merged 8 commits into from
Feb 28, 2018
Merged

Add SelectPopover component #4619

merged 8 commits into from
Feb 28, 2018

Conversation

edmundoa
Copy link
Contributor

This PR introduces a SelectPopover component that we want to use on actions and filters in TableList components:

screen shot 2018-02-27 at 17 26 24

Some features of this component:

  • Customise how to display elements via a function
  • Consumers of this component can control its selected item and get notified when it changes
  • Optional text filter element
  • Scrollable list if there are more than 10 items

Edmundo Alvarez added 6 commits February 26, 2018 16:32
- Display list of elements in a popover
- Store selected element in state
- Add callbacks to know when the selected element changed
This will allow us to set many options in there.
@edmundoa edmundoa added this to the 3.0.0 milestone Feb 27, 2018
@edmundoa edmundoa requested a review from mariussturm February 27, 2018 16:29
@@ -95,7 +95,7 @@ const SelectPopoverFormattedExample = createReactClass({
filterPlaceholder="Filter by colour" />
</div>

{selectedItem ? `You have selected ${selectedItem}` : 'Please select a colour!'}
{selectedItem ? `You have selected ${selectedItem}` : 'Please select another colour!'}
Copy link
Contributor

Choose a reason for hiding this comment

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

colour -> color

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😄

Copy link
Contributor

@mariussturm mariussturm left a comment

Choose a reason for hiding this comment

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

LGTM!

@mariussturm mariussturm merged commit abc7346 into master Feb 28, 2018
@mariussturm mariussturm deleted the add-select-popover branch February 28, 2018 09:30
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.

2 participants