Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

Commit

Permalink
Added props onCancelButton, onRequestClose. Fixed/added some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FDiskas committed Nov 10, 2017
1 parent 1b59773 commit 5a442b1
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 245 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ This component requires 3 dependencies :
| disabled | bool | false | Include this property to disable superSelectField.|
| value | null, object, object[] | null | Selected value(s).<br>/!\ REQUIRED: each object must expose a 'value' property. |
| onChange | function | () => {} | Triggers when selecting/unselecting an option from the Menu.<br>signature: (selectedValues, name) with `selectedValues` array of selected values based on selected nodes' value property, and `name` the value of the superSelectField instance's name property |
| onRequestClose | function | () => {} | If multiple is set triggers when clicking away |
| onMenuOpen | function | () => {} | Triggers when opening the Menu. |
| onAutoCompleteTyping | function | () => {} | Exposes the word typed in AutoComplete. Useful for triggering onType API requests. |
| children | any | [] | Datasource is an array of any type of nodes, styled at your convenience.<br>/!\ REQUIRED: each node must expose a `value` property. This value property will be used by default for both option's value and label.<br>A `label` property can be provided to specify a different value than `value`. |
Expand All @@ -74,7 +75,8 @@ PropTypes should raise warnings if implementing otherwise.
| menuGroupStyle | object | {} | Styles applied to the MenuItems hosting your \<optgroup/>. |
| innerDivStyle | object | {} | Styles applied to the inner div of MenuItems hosting each of your children components. |
| menuFooterStyle | object | {} | Styles applied to the Menu's footer. |
| menuCloseButton | node | | A button for an explicit closing of the menu. Useful on mobiles. |
| menuCloseButton | node | | A button for an explicit closing of the menu. Useful on mobiles. **Note** If defined click outside will not close the super select field |
| menuCancelButton | node | | A button for an explicit closing of the menu and resetting selected values to initial state. Can be used as "reset". **Note** If defined click outside will not close the super select field |
| selectedMenuItemStyle | object | {color: muiTheme.menuItem.selectedTextColor} | Styles to be applied to the selected MenuItem. |
| selectionsRenderer | function | see below | Provide your own renderer for selected options. Defaults to concatenating children's values text. Check CodeExample4 for a more advanced renderer example. |
| checkedIcon | SVGicon | see below | The SvgIcon to use for the checked state. This is useful to create icon toggles. |
Expand Down
Loading

0 comments on commit 5a442b1

Please sign in to comment.