- {chips && chips.length > 0 && chipComponents}
-
- {/* eslint-enable */}
+
+
+
+ {chips && chips.length > 0 && chipComponents}
+ 0 ? '' : placeholder}
+ disabled={disabled}
+ value={inputValue}
+ onBlur={onBlur}
+ onFocus={onFocus}
+ onChange={onInputChangeHandler}
+ onKeyDown={onKeyDownHandler}
+ />
+ {/* eslint-enable */}
+
+ {chips.length > 0 && !editable && (
+
+ )}
- {chips.length > 0 && (
-
- )}
);
};
diff --git a/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap b/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap
index 24768843db..80952aaa7a 100644
--- a/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap
+++ b/core/components/molecules/chipInput/__tests__/__snapshots__/ChipInput.test.tsx.snap
@@ -6,80 +6,85 @@ exports[`ChipInput component
@@ -91,81 +96,86 @@ exports[`ChipInput component
diff --git a/core/components/molecules/editableChipInput/EditableChipInput.tsx b/core/components/molecules/editableChipInput/EditableChipInput.tsx
index 05fcb3237c..c668deb13f 100644
--- a/core/components/molecules/editableChipInput/EditableChipInput.tsx
+++ b/core/components/molecules/editableChipInput/EditableChipInput.tsx
@@ -123,7 +123,7 @@ export const EditableChipInput = (props: EditableChipInputProps) => {
key={index}
name={val}
label={val}
- className="my-2 mx-2"
+ className="my-3 mx-2"
{...chipObject}
onClose={() => onChipDelete(index)}
onClick={() => onClick && onClick(val, index)}
@@ -151,7 +151,12 @@ export const EditableChipInput = (props: EditableChipInputProps) => {
);
}
return (
-
+
setShowComponent(true)}
+ tabIndex={0} //eslint-disable-line jsx-a11y/no-noninteractive-tabindex
+ >
{renderDefaultState()}
);
@@ -169,6 +174,7 @@ export const EditableChipInput = (props: EditableChipInputProps) => {
icon="clear"
className="mr-3"
size="tiny"
+ largeIcon={true}
onClick={() => {
setDefaultComponent(value);
}}
@@ -177,6 +183,7 @@ export const EditableChipInput = (props: EditableChipInputProps) => {
data-test="DesignSystem-EditableChipInput--SaveButton"
icon="check"
appearance="primary"
+ largeIcon={true}
size="tiny"
disabled={disableSaveAction}
onClick={onSaveChanges}
diff --git a/core/components/molecules/editableChipInput/__tests__/EditableChipInput.test.tsx b/core/components/molecules/editableChipInput/__tests__/EditableChipInput.test.tsx
index 1257f14886..36a82ab254 100644
--- a/core/components/molecules/editableChipInput/__tests__/EditableChipInput.test.tsx
+++ b/core/components/molecules/editableChipInput/__tests__/EditableChipInput.test.tsx
@@ -137,4 +137,12 @@ describe('EditableChipInput component with action buttons and props: value and c
expect(getAllByTestId('DesignSystem-EditableChipInput--Chip')[0].textContent).toMatch('Chip3clear_round');
expect(getAllByTestId('DesignSystem-EditableChipInput--Chip')[1].textContent).toMatch('Chip4clear_round');
});
+
+ it('does not render close icon', () => {
+ const { queryByTestId } = render(
+
+ );
+
+ expect(queryByTestId('DesignSystem-ChipInput--Icon')).not.toBeInTheDocument();
+ });
});
diff --git a/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap b/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap
index 6f0fd10e47..f4fe1ab9dc 100644
--- a/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap
+++ b/core/components/molecules/editableChipInput/__tests__/__snapshots__/EditableChipInput.test.tsx.snap
@@ -18,9 +18,10 @@ exports[`EditableChipInput component