Skip to content

Commit ff35a27

Browse files
authored
fix: use field id as an identifier for custom properties (#1443)
closes #1440
1 parent d8a65e5 commit ff35a27

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/form-js-editor/src/features/properties-panel/groups/CustomPropertiesGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function CustomPropertiesGroup(field, editField) {
4646
return editField(field, ['properties'], removeKey(properties, key));
4747
};
4848

49-
const id = `property-${index}`;
49+
const id = `property-${field.id}-${index}`;
5050

5151
return {
5252
autoFocusEntry: id + '-key',

packages/form-js-editor/test/spec/features/properties-panel/PropertiesPanel.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3618,7 +3618,7 @@ describe('properties panel', function () {
36183618
});
36193619

36203620
// when
3621-
const input = screen.getByLabelText('Key', { selector: '#bio-properties-panel-property-0-key' });
3621+
const input = screen.getByLabelText('Key', { selector: `#bio-properties-panel-property-${field.id}-0-key` });
36223622

36233623
fireEvent.input(input, { target: { value: '' } });
36243624

@@ -3643,7 +3643,7 @@ describe('properties panel', function () {
36433643
});
36443644

36453645
// when
3646-
const input = screen.getByLabelText('Key', { selector: '#bio-properties-panel-property-0-key' });
3646+
const input = screen.getByLabelText('Key', { selector: `#bio-properties-panel-property-${field.id}-0-key` });
36473647

36483648
fireEvent.input(input, { target: { value: 'middleName' } });
36493649

0 commit comments

Comments
 (0)