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

Support full dropdown functionality #168

Merged
merged 1 commit into from
Mar 20, 2016

Conversation

levithomason
Copy link
Member

Try It

There are 3 examples written. More will be added in other PRs later.

Not as large as it looks

This PR includes 3 primary things:

  1. Doc Site Examples
  2. Test updates
  3. Dropdown rewrite

Done

Fixes #4 supporting all dropdown permutations. Also fixes #149 supporting dynamic options.

  • add dropdown menu, item, and divider sub components
  • support icons
  • support item text/value/descriptions
  • add extended dropdown example using dropdown subcomponents
  • handle regular dropdowns (menu only style)
  • handle selection dropdowns, with hidden input for values
  • separate component / plugin prop types
  • componentDidUpdate
  • add async options example

@levithomason levithomason force-pushed the feature/dynamic-dropdown-options branch from 31628c0 to 9e7b716 Compare February 13, 2016 21:18
@levithomason levithomason force-pushed the feature/dynamic-dropdown-options branch from 633e1e6 to cc91c86 Compare March 10, 2016 08:50
Fetch Items
</Button>
<Dropdown
className={`search selection multiple ${isFetching && 'disabled loading'}`}
Copy link

Choose a reason for hiding this comment

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

I had opened an issue related to programmatic use of the loading indicator with https://github.com/TechnologyAdvice/stardust/issues/149. Can that be closed with this PR?

@ghost
Copy link

ghost commented Mar 10, 2016

This is great! I left a couple of comments. Other than that the code looks great. Thanks for updating Examples given we have a new way to structure our menus now (e.g. <Dropdown.Menu />).

Ship when ready: ⭐

@levithomason levithomason force-pushed the feature/dynamic-dropdown-options branch 3 times, most recently from 8a37453 to 13b8c65 Compare March 19, 2016 00:03
export default class DropdownDropdownExample extends Component {
render() {
return (
<Dropdown text='File' action='hide'>
Copy link
Member Author

Choose a reason for hiding this comment

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

If you only want to show a menu, and not have the text update, set the correct Semantic UI action. In this case, we just hide the dropdown on select. This leaves the File text in the dropdown space so it looks and works like a normal dropdown menu (not a selection dropdown).

@levithomason levithomason force-pushed the feature/dynamic-dropdown-options branch 3 times, most recently from 81c15f6 to e1e9c7f Compare March 20, 2016 03:18
@levithomason levithomason force-pushed the feature/dynamic-dropdown-options branch from e1e9c7f to 1b8a7df Compare March 20, 2016 03:30
levithomason added a commit that referenced this pull request Mar 20, 2016
…n-options

Support full dropdown functionality
@levithomason levithomason merged commit 6d7311e into master Mar 20, 2016
@levithomason levithomason deleted the feature/dynamic-dropdown-options branch March 20, 2016 04:25
return (
<Dropdown className='disabled' text='Dropdown'>
<Dropdown.Menu>
<Dropdown.Item text='Choice 1' />
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't get this example to work. the Dropdown.Items don't show up.

Copy link
Member Author

Choose a reason for hiding this comment

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

Linking #346

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.

Dropdown fails to open on initial render with dynamic className change Support all dropdown types
2 participants