From 56a91fcd58782a91cbc966a17e39637cd6fd5ad1 Mon Sep 17 00:00:00 2001 From: Ana Date: Tue, 24 Sep 2019 11:29:05 -0300 Subject: [PATCH 1/2] fix Ajusta prop enviada para option no select --- source/components/select/elements/select-option.js | 1 + source/components/select/select-component.js | 3 ++- source/components/select/select.stories.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/components/select/elements/select-option.js b/source/components/select/elements/select-option.js index e227e1ba8..e5c39efb0 100644 --- a/source/components/select/elements/select-option.js +++ b/source/components/select/elements/select-option.js @@ -29,6 +29,7 @@ SelectOption.propTypes = { onSelect: PropTypes.func, selected: PropTypes.bool, children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), + noCurrentValue: PropTypes.bool, }; export default SelectOption; diff --git a/source/components/select/select-component.js b/source/components/select/select-component.js index e6413c500..9bdb43963 100644 --- a/source/components/select/select-component.js +++ b/source/components/select/select-component.js @@ -46,6 +46,7 @@ class Select extends Component { sortItems: PropTypes.bool, isMobile: PropTypes.bool, active: PropTypes.bool, + noCurrentValue: PropTypes.bool, }; static defaultProps = { @@ -277,7 +278,7 @@ class Select extends Component { selected={selectedValue === option.value} onSelect={this.onSelectItem} value={option.value} - noneValue={noCurrentValue && selectedValue === option.value} + noCurrentValue={noCurrentValue && selectedValue === option.value} > {option.name} diff --git a/source/components/select/select.stories.js b/source/components/select/select.stories.js index ba9866641..1c933951f 100644 --- a/source/components/select/select.stories.js +++ b/source/components/select/select.stories.js @@ -84,7 +84,7 @@ stories.add('Select disabled', () => { ); }); -stories.add('Select - None atual value', () => { +stories.add('Select - No Current Value', () => { return (