Skip to content

Commit

Permalink
[APM] Agent config select box doesn't work on IE (elastic#63236)
Browse files Browse the repository at this point in the history
* adding value property to select options

* fixing test
  • Loading branch information
cauemarcondes committed Apr 10, 2020
1 parent 89d24a0 commit cdd334e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ function FormRow({
return (
<SelectWithPlaceholder
placeholder={setting.placeholder}
options={[{ text: 'true' }, { text: 'false' }]}
options={[
{ text: 'true', value: 'true' },
{ text: 'false', value: 'false' }
]}
value={value}
onChange={e => onChange(setting.key, e.target.value)}
/>
Expand Down Expand Up @@ -105,7 +108,7 @@ function FormRow({
defaultMessage: 'Select unit'
})}
value={unit}
options={setting.units?.map(text => ({ text }))}
options={setting.units?.map(text => ({ text, value: text }))}
onChange={e =>
onChange(
setting.key,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ export const generalSettings: RawSettingDefinition[] = [
}
),
options: [
{ text: 'off' },
{ text: 'errors' },
{ text: 'transactions' },
{ text: 'all' }
{ text: 'off', value: 'off' },
{ text: 'errors', value: 'errors' },
{ text: 'transactions', value: 'transactions' },
{ text: 'all', value: 'all' }
],
excludeAgents: ['js-base', 'rum-js']
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ interface FloatSetting extends BaseSetting {

interface SelectSetting extends BaseSetting {
type: 'select';
options: Array<{ text: string }>;
options: Array<{ text: string; value: string }>;
}

interface BooleanSetting extends BaseSetting {
Expand Down

0 comments on commit cdd334e

Please sign in to comment.