Skip to content

Commit 9768d70

Browse files
committed
TS updates
1 parent 45d7317 commit 9768d70

File tree

12 files changed

+28
-32
lines changed

12 files changed

+28
-32
lines changed

src/plugins/es_ui_shared/static/forms/components/fields/numeric_field.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import React from 'react';
21-
import { EuiFormRow, EuiFieldNumber } from '@elastic/eui';
21+
import { EuiFormRow, EuiFieldNumber, EuiFieldNumberProps } from '@elastic/eui';
2222

2323
import { FieldHook, getFieldValidityAndErrorMessage } from '../../hook_form_lib';
2424

@@ -44,7 +44,7 @@ export const NumericField = ({ field, euiFieldProps = {}, ...rest }: Props) => {
4444
>
4545
<EuiFieldNumber
4646
isInvalid={isInvalid}
47-
value={field.value as string}
47+
value={field.value as EuiFieldNumberProps['value']}
4848
onChange={field.onChange}
4949
isLoading={field.isValidating}
5050
fullWidth

x-pack/legacy/plugins/beats_management/public/components/inputs/multi_input.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { CommonProps } from '@elastic/eui/src/components/common';
99
import { FormsyInputProps, withFormsy } from 'formsy-react';
1010
import React, { Component, InputHTMLAttributes } from 'react';
1111

12-
interface ComponentProps extends FormsyInputProps, CommonProps, EuiTextAreaProps {
12+
interface ComponentProps
13+
extends FormsyInputProps,
14+
CommonProps,
15+
Omit<EuiTextAreaProps, 'onChange' | 'onBlur'> {
1316
instantValidation: boolean;
1417
label: string;
1518
errorText: string;

x-pack/legacy/plugins/beats_management/public/components/inputs/password_input.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
// @ts-ignore currently no definition for EuiFieldPassword
87
import { CommonProps, EuiFieldPassword, EuiFieldPasswordProps, EuiFormRow } from '@elastic/eui';
98
import { FormsyInputProps, withFormsy } from 'formsy-react';
109
import React, { Component, InputHTMLAttributes } from 'react';
1110

12-
interface ComponentProps extends FormsyInputProps, CommonProps, EuiFieldPasswordProps {
11+
interface ComponentProps
12+
extends FormsyInputProps,
13+
CommonProps,
14+
Omit<EuiFieldPasswordProps, 'onChange' | 'onBlur'> {
1315
instantValidation?: boolean;
1416
label: string;
1517
errorText: string;

x-pack/legacy/plugins/beats_management/public/components/layouts/walkthrough.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66

77
import React from 'react';
88

9-
import {
10-
EuiPageContent,
11-
EuiPageContentBody,
12-
// @ts-ignore
13-
EuiStepsHorizontal,
14-
EuiTitle,
15-
} from '@elastic/eui';
9+
import { EuiPageContent, EuiPageContentBody, EuiStepsHorizontal, EuiTitle } from '@elastic/eui';
1610

1711
interface LayoutProps {
1812
title: string;

x-pack/legacy/plugins/graph/public/components/field_manager/field_editor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
EuiComboBox,
1313
EuiColorPicker,
1414
EuiFieldNumber,
15-
// @ts-ignore
1615
EuiHighlight,
1716
EuiContextMenu,
1817
EuiIcon,

x-pack/legacy/plugins/lens/public/indexpattern_plugin/dimension_panel/field_select.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ import React, { useMemo } from 'react';
99
import { i18n } from '@kbn/i18n';
1010
import { EuiComboBox, EuiFlexGroup, EuiFlexItem, EuiComboBoxOptionProps } from '@elastic/eui';
1111
import classNames from 'classnames';
12-
import {
13-
// @ts-ignore
14-
EuiHighlight,
15-
} from '@elastic/eui';
12+
import { EuiHighlight } from '@elastic/eui';
1613
import { OperationType } from '../indexpattern';
1714
import { LensFieldIcon } from '../lens_field_icon';
1815
import { DataType } from '../../types';

x-pack/legacy/plugins/lens/public/indexpattern_plugin/operations/definitions/date_histogram.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ export const dateHistogramOperation: OperationDefinition<DateHistogramIndexPatte
208208
<EuiFlexItem>
209209
<EuiFieldNumber
210210
data-test-subj="lensDateHistogramValue"
211-
value={interval.value}
211+
value={
212+
typeof interval.value === 'number' || interval.value === ''
213+
? interval.value
214+
: parseInt(interval.value, 10)
215+
}
212216
disabled={calendarOnlyIntervals.has(interval.unit)}
213217
isInvalid={!isValid}
214218
onChange={e => {

x-pack/legacy/plugins/security/public/views/management/edit_role/components/privileges/kibana/space_aware_privilege_section/space_selector.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import {
8-
EuiComboBox,
9-
EuiComboBoxOptionProps,
10-
EuiHealth,
11-
// @ts-ignore
12-
EuiHighlight,
13-
} from '@elastic/eui';
7+
import { EuiComboBox, EuiComboBoxOptionProps, EuiHealth, EuiHighlight } from '@elastic/eui';
148
import { InjectedIntl } from '@kbn/i18n/react';
159
import React, { Component } from 'react';
1610
import { Space } from '../../../../../../../../../spaces/common/model/space';

x-pack/legacy/plugins/siem/public/components/fields_browser/field_name.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import {
88
EuiButtonIcon,
9-
// @ts-ignore
109
EuiHighlight,
1110
EuiIcon,
1211
EuiFlexGroup,

x-pack/legacy/plugins/upgrade_assistant/public/np_ready/application/components/tabs/checkup/checkup_tab.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { find } from 'lodash';
88
import React, { Fragment } from 'react';
99

1010
import {
11-
// @ts-ignore
12-
EuiAccordion,
1311
EuiCallOut,
1412
EuiEmptyPrompt,
1513
EuiLink,

0 commit comments

Comments
 (0)