Skip to content

Commit

Permalink
Merge pull request #706 from chiragg928/fix(hybridSelect)
Browse files Browse the repository at this point in the history
fix(hybridSelect): prevent label prop pass to Select
  • Loading branch information
kksarma authored Feb 16, 2021
2 parents 997e5d5 + 1c48fe5 commit 75acdfd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions catalog/pages/inputs/HybridSelectExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export default class HybridSelectExample extends Component {
Option Two
</HybridOption>
{/* Add prop optionText while children is not plain text */}
<HybridOption value="2" index={2} optionText=" Option Three">
<div>Option Three</div>
<HybridOption value="2" index={2} optionText="Option Three">
{label ? "Option Three" : <div>Option Three</div>}
</HybridOption>
<HybridOption value="3" index={3}>
Option Four
Expand Down
1 change: 0 additions & 1 deletion src/components/Input/HybridDropDown/HybridSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class HybridSelect extends Component {
showSelect={showNativeSelect}
value={value[0]}
selectRef={selectRef}
label={label}
onChange={this.updateValue}
onMouseEnter={this.onMouseEnter}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ Object {
<select
class="c1 select--large select--border hybrid"
data-testid="test-hybridselect"
label="Sort By: "
>
<option
value=""
Expand Down

0 comments on commit 75acdfd

Please sign in to comment.