Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
07d3d62
Auto-fix violations of the @elastic/eui/consistent-is-invalid-props E…
alexwizp Jul 7, 2025
ef9d086
fix issues
alexwizp Jul 7, 2025
8fa5ecb
fix jest
alexwizp Jul 7, 2025
97aa9fe
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 8, 2025
054b6b3
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 8, 2025
e710e34
Merge remote-tracking branch 'origin/main' into fix-consistent-is-inv…
alexwizp Jul 9, 2025
e1a17c8
Merge remote-tracking branch 'origin/main' into fix-consistent-is-inv…
alexwizp Jul 9, 2025
9efae64
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 9, 2025
576e2bf
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 10, 2025
d1c84dd
Merge remote-tracking branch 'origin/main' into fix-consistent-is-inv…
alexwizp Jul 11, 2025
9d24d79
update /vis_default_editor/public/components/options/required_num.tsx
alexwizp Jul 11, 2025
709b47f
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 11, 2025
0ac153a
Update range_input_field.tsx
alexwizp Jul 11, 2025
ff1498f
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 14, 2025
19440d8
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 14, 2025
ba304a3
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 14, 2025
42d43d7
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 15, 2025
1b023b7
Update x-pack/platform/plugins/shared/ml/public/application/data_fram…
alexwizp Jul 15, 2025
cc01d7c
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 15, 2025
d2e850a
Merge remote-tracking branch 'origin/main' into fix-consistent-is-inv…
alexwizp Jul 15, 2025
38fdf89
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 16, 2025
0820cda
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 16, 2025
211c97b
fix typecheck
alexwizp Jul 16, 2025
c5653a8
Merge branch 'main' into fix-consistent-is-invalid-props
alexwizp Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ export const AlertDeleteModal = ({
isInvalid={!validations.isDeleteConfirmationValid}
>
<EuiFieldText
isInvalid={!validations.isDeleteConfirmationValid}
value={deleteConfirmation}
disabled={isDisabled || !currentSettingsWouldDeleteAlerts}
onChange={onChangeDeleteConfirmation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const RuleConsumerSelection = (props: RuleConsumerSelectionProps) => {
aria-label={CONSUMER_SELECT_TITLE}
>
<EuiComboBox
isInvalid={!!baseErrors?.consumer?.length}
fullWidth
data-test-subj="ruleConsumerSelectionInput"
aria-label={CONSUMER_SELECT_COMBO_BOX_TITLE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export const RuleDetails = () => {
error={baseErrors?.tags}
>
<EuiComboBox
isInvalid={!!baseErrors?.tags?.length}
fullWidth
noSuggestions
placeholder={RULE_TAG_PLACEHOLDER}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export function ImageEditorFlyout(props: ImageEditorFlyoutProps) {
error={srcUrlError}
>
<EuiTextArea
isInvalid={!!srcUrlError}
data-test-subj={'imageEmbeddableEditorUrlInput'}
fullWidth
compressed={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { EuiFormRow, EuiFieldNumber } from '@elastic/eui';
interface NumberInputOptionProps<ParamName extends string> {
disabled?: boolean;
error?: ReactNode;
isInvalid?: boolean;
label?: React.ReactNode;
max?: number;
min?: number;
Expand All @@ -34,7 +33,6 @@ interface NumberInputOptionProps<ParamName extends string> {
function RequiredNumberInputOption<ParamName extends string>({
disabled,
error,
isInvalid,
label,
max,
min,
Expand All @@ -60,7 +58,7 @@ function RequiredNumberInputOption<ParamName extends string>({
);

return (
<EuiFormRow label={label} error={error} isInvalid={isInvalid} fullWidth display="rowCompressed">
<EuiFormRow label={label} error={error} isInvalid={!isValid} fullWidth display="rowCompressed">
<EuiFieldNumber
compressed
fullWidth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export class UrlFormatEditor extends DefaultFormatEditor<
error={error}
>
<EuiFieldText
isInvalid={!!error}
data-test-subj="urlEditorUrlTemplate"
value={formatParams.urlTemplate || ''}
onChange={(e) => {
Expand Down Expand Up @@ -253,6 +254,7 @@ export class UrlFormatEditor extends DefaultFormatEditor<
error={error}
>
<EuiFieldText
isInvalid={!!error}
data-test-subj="urlEditorLabelTemplate"
value={formatParams.labelTemplate || ''}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const ComboBoxField = ({ field, euiFieldProps = {}, idAria, ...rest }: Pr
{...rest}
>
<EuiComboBox
isInvalid={isInvalid}
noSuggestions
placeholder={i18n.translate('esUi.forms.comboBoxField.placeHolderText', {
defaultMessage: 'Type and then hit "ENTER"',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export const DestinationIndexForm: FC<DestinationIndexFormProps> = ({
defaultMessage: 'Choose a unique destination index name.',
}
)}
isInvalid={!destinationIndexNameEmpty && !destinationIndexNameValid}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elastic/ml-ui, please confirm that the value copied from EuiFormRow is relevant

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is relevant 👍

isInvalid={
destinationIndexNameEmpty || (!destinationIndexNameEmpty && !destinationIndexNameValid)
}
data-test-subj="mlCreationWizardUtilsDestinationIndexInput"
/>
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export const AdditionalOptionsFields: React.FC<AdditionalOptionsFieldsProps> = (
}
>
<EuiFieldText
isInvalid={isInvalid}
data-test-subj="inference-endpoint-input-field"
fullWidth
disabled={isEdit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export const SemanticTextForm: FC<Props> = ({ addCombinedField, hasNameCollision
error={[fieldError]}
>
<EuiFieldText
isInvalid={fieldError !== undefined}
placeholder={i18n.translate(
'xpack.dataVisualizer.file.semanticTextForm.copyFieldLabel.placeholder',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const IndexInput: FC<Props> = ({
)}
>
<EuiFieldText
isInvalid={indexNameError !== ''}
fullWidth
value={indexNameLocal}
onChange={(e) => setIndexNameLocal(e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class GeoFilePicker extends Component<Props, State> {
helpText={this._renderHelpText()}
>
<EuiFilePicker
isInvalid={!!this.state.error}
initialPromptText={i18n.translate('xpack.fileUpload.geoFilePicker.filePicker', {
defaultMessage: 'Select or drag and drop a file',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export const AddPolicyToTemplateConfirmModal: React.FunctionComponent<Props> = (
}
>
<EuiComboBox
isInvalid={!!templateError}
isLoading={isLoading}
placeholder={i18n.translate(
'xpack.indexLifecycleMgmt.policyTable.addLifecyclePolicyToTemplateConfirmModal.chooseTemplateMessage',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export class AddLifecyclePolicyConfirmModal extends Component<Props, State> {
}
>
<EuiSelect
isInvalid={!!policyErrorMessage}
options={options}
value={selectedPolicyName}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const AlertParamNumber: React.FC<Props> = (props: Props) => {
return (
<EuiFormRow label={details.label as string} error={errors} isInvalid={errors?.length > 0}>
<EuiFieldNumber
isInvalid={errors?.length > 0}
compressed
value={value}
append={details.append as string}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const AlertParamPercentage: React.FC<Props> = (props: Props) => {
return (
<EuiFormRow label={label} error={errors} isInvalid={errors.length > 0}>
<EuiFieldNumber
isInvalid={errors.length > 0}
compressed
value={value}
append={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const AlertParamTextField: React.FC<Props> = (props: Props) => {
return (
<EuiFormRow label={label} error={errors} isInvalid={errors?.length > 0}>
<EuiFieldText
isInvalid={errors?.length > 0}
compressed
placeholder={placeholder}
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const PolicyStepLogistics: React.FunctionComponent<StepProps> = ({
fullWidth
>
<EuiFieldText
isInvalid={touched.name && Boolean(errors.name)}
defaultValue={policy.name}
fullWidth
onBlur={() => setTouched({ ...touched, name: true })}
Expand Down Expand Up @@ -412,6 +413,7 @@ export const PolicyStepLogistics: React.FunctionComponent<StepProps> = ({
fullWidth
>
<EuiFieldText
isInvalid={touched.schedule && Boolean(errors.schedule)}
defaultValue={policy.schedule}
fullWidth
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export const PolicyStepRetention: React.FunctionComponent<StepProps> = ({
fullWidth
>
<EuiFieldNumber
isInvalid={touched.minCount && Boolean(errors.minCount)}
fullWidth
value={retention.minCount || ''}
onBlur={() => setTouched({ ...touched, minCount: true })}
Expand Down Expand Up @@ -197,6 +198,7 @@ export const PolicyStepRetention: React.FunctionComponent<StepProps> = ({
fullWidth
>
<EuiFieldNumber
isInvalid={touched.maxCount && Boolean(errors.maxCount)}
fullWidth
value={retention.maxCount || ''}
onBlur={() => setTouched({ ...touched, maxCount: true })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const RepositoryFormStepOne: React.FunctionComponent<Props> = ({
fullWidth
>
<EuiFieldText
isInvalid={Boolean(hasValidationErrors && validation.errors.name)}
defaultValue={repository.name}
fullWidth
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export const AzureSettings: React.FunctionComponent<Props> = ({
error={settingErrors.locationMode}
>
<EuiSelect
isInvalid={Boolean(hasErrors && settingErrors.locationMode)}
options={locationModeOptions}
value={locationMode || locationModeOptions[0].value}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const ChunkSizeField: React.FunctionComponent<Props> = ({
}
>
<EuiFieldText
isInvalid={isInvalid}
defaultValue={defaultValue}
fullWidth
onChange={(e) => updateSettings('chunkSize', e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const MaxRestoreField: React.FunctionComponent<Props> = ({
}
>
<EuiFieldText
isInvalid={isInvalid}
defaultValue={defaultValue}
fullWidth
onChange={(e) => updateSettings('maxRestoreBytesPerSec', e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const MaxSnapshotsField: React.FunctionComponent<Props> = ({
}
>
<EuiFieldText
isInvalid={isInvalid}
defaultValue={defaultValue}
fullWidth
onChange={(e) => updateSettings('maxSnapshotBytesPerSec', e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const FSSettings: React.FunctionComponent<Props> = ({
error={settingErrors.location}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.location)}
defaultValue={location || ''}
fullWidth
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const HDFSSettings: React.FunctionComponent<Props> = ({
error={settingErrors.uri}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.uri)}
prepend={
<EuiText size="s" id="hdfsRepositoryUriProtocolDescription">
{/* Wrap as string due to prettier not parsing `//` inside JSX correctly (prettier/prettier#2347) */}
Expand Down Expand Up @@ -148,6 +149,7 @@ export const HDFSSettings: React.FunctionComponent<Props> = ({
error={settingErrors.path}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.path)}
defaultValue={path || ''}
fullWidth
onChange={(e) => {
Expand Down Expand Up @@ -286,6 +288,7 @@ export const HDFSSettings: React.FunctionComponent<Props> = ({
error={settingErrors.securityPrincipal}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.securityPrincipal)}
defaultValue={securityPrincipal || ''}
fullWidth
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export const ReadonlySettings: React.FunctionComponent<Props> = ({
error={settingErrors.url}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.url)}
defaultValue={url ? url.split('://')[1] : ''}
fullWidth
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ export const S3Settings: React.FunctionComponent<Props> = ({
}
>
<EuiFieldText
isInvalid={Boolean(hasErrors && settingErrors.bufferSize)}
defaultValue={bufferSize || ''}
fullWidth
onChange={(e) => {
Expand Down Expand Up @@ -437,6 +438,7 @@ export const S3Settings: React.FunctionComponent<Props> = ({
error={settingErrors.cannedAcl}
>
<EuiSelect
isInvalid={Boolean(hasErrors && settingErrors.cannedAcl)}
options={cannedAclOptions}
value={cannedAcl || cannedAclOptions[0].value}
onChange={(e) => {
Expand Down Expand Up @@ -482,6 +484,7 @@ export const S3Settings: React.FunctionComponent<Props> = ({
error={settingErrors.storageClass}
>
<EuiSelect
isInvalid={Boolean(hasErrors && settingErrors.storageClass)}
options={storageClassOptions}
value={storageClass || storageClassOptions[0].value}
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ export const RestoreSnapshotStepLogistics: React.FunctionComponent<StepProps> =
error={errors.renamePattern}
>
<EuiFieldText
isInvalid={Boolean(errors.renamePattern)}
value={renamePattern}
placeholder="data_(.+)"
onChange={(e) => {
Expand Down Expand Up @@ -529,6 +530,7 @@ export const RestoreSnapshotStepLogistics: React.FunctionComponent<StepProps> =
error={errors.renameReplacement}
>
<EuiFieldText
isInvalid={Boolean(errors.renameReplacement)}
value={renameReplacement}
placeholder="restored_data_$1"
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export const RestoreSnapshotStepSettings: React.FunctionComponent<StepProps> = (
error={errors.ignoreIndexSettings}
>
<EuiComboBox
isInvalid={Boolean(errors.ignoreIndexSettings)}
placeholder={i18n.translate(
'xpack.snapshotRestore.restoreForm.stepSettings.ignoreIndexSettingsPlaceholder',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export const RetentionSettingsUpdateModalProvider: React.FunctionComponent<Props
fullWidth
>
<EuiFieldText
isInvalid={isInvalid}
defaultValue={retentionSchedule}
fullWidth
onChange={(e) => setRetentionSchedule(e.target.value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export const PopoverForm: React.FC<Props> = ({ defaultData, otherAggNames, onCha
})}
>
<EuiComboBox
isInvalid={!timeZoneValid}
options={TIMEZONE_OPTIONS}
onChange={(opt) => setSelectedTimeZone(opt)}
selectedOptions={selectedTimeZone}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const TermsAggForm: IPivotAggsConfigTerms['AggFormComponent'] = ({
isInvalid={!isValid}
>
<EuiFieldNumber
isInvalid={!isValid}
value={aggConfig.size}
onChange={(e) => {
onChange({ size: Number(e.target.value) });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ export const StepDetailsForm: FC<StepDetailsFormProps> = React.memo(
defaultMessage: 'Choose a maximum page search size.',
}
)}
isInvalid={!isTransformFrequencyValid}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elastic/ml-ui, please confirm that the value copied from EuiFormRow is relevant

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is relevant 👍

isInvalid={!isTransformSettingsMaxPageSearchSizeValid}
data-test-subj="transformMaxPageSearchSizeInput"
/>
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const EditTransformRetentionPolicy: FC = () => {
)}
>
<EuiSelect
isInvalid={retentionPolicyField.errorMessages.length > 0}
aria-label={i18n.translate(
'xpack.transform.transformList.editFlyoutFormRetentionPolicyFieldSelectAriaLabel',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const DataStreamStep = React.memo<DataStreamStepProps>(
data-test-subj="nameInput"
value={name}
onChange={onChange.name}
isInvalid={invalidFields.name}
isInvalid={!!nameInputError || invalidFields.name}
isLoading={isLoadingPackageNames}
disabled={isLoadingPackageNames}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const AssigneesFieldComponent: React.FC<FieldProps> = React.memo(
data-test-subj="caseAssignees"
>
<EuiComboBox
isInvalid={isInvalid}
fullWidth
async
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const ResilientFieldsComponent: React.FunctionComponent<ConnectorFieldsProps> =
error={errorMessage}
>
<EuiComboBox
isInvalid={isInvalid}
data-test-subj="incidentTypeComboBox"
fullWidth
isClearable={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export const AttachIndexBox: React.FC<AttachIndexBoxProps> = ({ connector }) =>
isInvalid={!!error}
>
<EuiComboBox
isInvalid={!!error}
placeholder={i18n.translate(
'xpack.searchConnectorsattachIndexBox.euiFormRow.indexSelector.placeholder',
{ defaultMessage: 'Select or create an index' }
Expand Down
Loading
Loading