+
) => {
+ if (e.key === 'Enter') {
+ handleChipAdd(e.currentTarget.value);
+ e.currentTarget.value = '';
+ }
+ }}
+ />
+ {chipsValues.map((value, index) => (
+
+ {editingIndex === index ? (
+
handleChipChange(e, index)}
+ onBlur={() => setEditingIndex(null)}
+ autoFocus
+ />
+ ) : (
+
handleChipEdit(index)}>
+ {value}
+
+ )}
+
handleChipDelete(index)}>
+ ×
+
+
+ ))}
+