Skip to content

Commit

Permalink
[Security Solution] Fix the Field dropdown in Timeline data providers…
Browse files Browse the repository at this point in the history
… resets when scrolled (elastic#80718)
  • Loading branch information
patrykkopycinski committed Oct 15, 2020
1 parent 9153ddc commit 3aad403
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
EuiFormRow,
EuiPanel,
EuiSpacer,
EuiToolTip,
} from '@elastic/eui';
import React, { useEffect, useMemo, useState, useCallback } from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -193,18 +192,16 @@ export const StatefulEditDataProvider = React.memo<Props>(
<EuiFlexGroup direction="row" gutterSize="none" justifyContent="spaceBetween">
<EuiFlexItem grow={false}>
<EuiFormRow label={i18n.FIELD}>
<EuiToolTip content={updatedField.length > 0 ? updatedField[0].label : null}>
<EuiComboBox
data-test-subj="field"
isClearable={false}
onChange={onFieldSelected}
options={getCategorizedFieldNames(browserFields)}
placeholder={i18n.FIELD_PLACEHOLDER}
selectedOptions={updatedField}
singleSelection={{ asPlainText: true }}
style={{ width: `${FIELD_COMBO_BOX_WIDTH}px` }}
/>
</EuiToolTip>
<EuiComboBox
data-test-subj="field"
isClearable={false}
onChange={onFieldSelected}
options={getCategorizedFieldNames(browserFields)}
placeholder={i18n.FIELD_PLACEHOLDER}
selectedOptions={updatedField}
singleSelection={{ asPlainText: true }}
style={{ width: `${FIELD_COMBO_BOX_WIDTH}px` }}
/>
</EuiFormRow>
</EuiFlexItem>

Expand Down

0 comments on commit 3aad403

Please sign in to comment.