Skip to content

Commit

Permalink
LPS-101063 - Don't merge into master - just a POC
Browse files Browse the repository at this point in the history
  • Loading branch information
natecavanaugh committed Oct 31, 2019
1 parent 6a44da5 commit eeaa3ae
Showing 1 changed file with 30 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ class StringInput extends React.Component {
};

render() {
const {disabled, options, value} = this.props;
let {disabled, displayValue, options, value} = this.props;

if (value) {
options = [{label: 'test', value: 1234}];
}

return options.length === 0 ? (
<div className="criterion-input input-group">
Expand All @@ -127,19 +131,32 @@ class StringInput extends React.Component {
</div>
</div>
) : (
<ClaySelectWithOption
className="criterion-input form-control"
data-testid="options-string"
disabled={disabled}
onChange={this._handleChange}
options={options.map(o => ({
label: o.label,
value: o.value
}))}
value={value}
/>
<div className="criterion-input input-group">
<div className="input-group-prepend">
<button
className="btn btn-secondary"
id="button-addon1"
onClick={this._handleSelectEntity}
type="button"
>
{displayValue}
</button>
</div>

<ClaySelectWithOption
className="criterion-input form-control input-group-item input-group-append input-group-item-shrink"
data-testid="options-string"
disabled={disabled}
onChange={this._handleChange}
options={options.map(o => ({
label: o.label,
value: o.value
}))}
value={value}
/>
</div>
);
}
}

export default StringInput;
export default StringInput;

0 comments on commit eeaa3ae

Please sign in to comment.