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 authored and Maja Grubic committed Apr 16, 2020
1 parent 5033678 commit 8acefd6
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 8acefd6

Please sign in to comment.