Skip to content

Commit 457db30

Browse files
committed
fix(zeebe): don't create new _Binding_ and _Version tag_ on rerender
Related to camunda/camunda-modeler#4513
1 parent 8a4cacc commit 457db30

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/provider/zeebe/properties/CalledDecisionProps.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ import { FeelEntryWithVariableContext } from '../../../entries/FeelEntryWithCont
2727

2828
import { withProps } from '../../HOCs/withProps.js';
2929

30+
const CalledDecisionBinding = withProps(Binding, { type: 'zeebe:CalledDecision' }),
31+
CalledDecisionVersionTag = withProps(VersionTag, { type: 'zeebe:CalledDecision' });
32+
3033

3134
export function CalledDecisionProps(props) {
3235
const {
@@ -45,15 +48,15 @@ export function CalledDecisionProps(props) {
4548
},
4649
{
4750
id: 'bindingType',
48-
component: withProps(Binding, { type: 'zeebe:CalledDecision' }),
51+
component: CalledDecisionBinding,
4952
isEdited: isSelectEntryEdited
5053
}
5154
];
5255

5356
if (getBindingType(element, 'zeebe:CalledDecision') === 'versionTag') {
5457
entries.push({
5558
id: 'versionTag',
56-
component: withProps(VersionTag, { type: 'zeebe:CalledDecision' }),
59+
component: CalledDecisionVersionTag,
5760
isEdited: isTextFieldEntryEdited
5861
});
5962
}

src/provider/zeebe/properties/FormProps.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ import {
4040

4141
import { withProps } from '../../HOCs';
4242

43+
const FormDefinitionBinding = withProps(Binding, { type: 'zeebe:FormDefinition' }),
44+
FormDefinitionVersionTag = withProps(VersionTag, { type: 'zeebe:FormDefinition' });
45+
4346
const NONE_VALUE = 'none';
4447

4548

@@ -87,14 +90,14 @@ export function FormProps(props) {
8790
if (formType === FORM_TYPES.CAMUNDA_FORM_LINKED) {
8891
entries.push({
8992
id: 'bindingType',
90-
component: withProps(Binding, { type: 'zeebe:FormDefinition' }),
93+
component: FormDefinitionBinding,
9194
isEdited: isSelectEntryEdited
9295
});
9396

9497
if (getBindingType(element, 'zeebe:FormDefinition') === 'versionTag') {
9598
entries.push({
9699
id: 'versionTag',
97-
component: withProps(VersionTag, { type: 'zeebe:FormDefinition' }),
100+
component: FormDefinitionVersionTag,
98101
isEdited: isTextFieldEntryEdited
99102
});
100103
}

src/provider/zeebe/properties/TargetProps.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ import { FeelEntryWithVariableContext } from '../../../entries/FeelEntryWithCont
2727

2828
import { withProps } from '../../HOCs/withProps.js';
2929

30+
const CalledElementBinding = withProps(Binding, { type: 'zeebe:CalledElement' }),
31+
CalledElementVersionTag = withProps(VersionTag, { type: 'zeebe:CalledElement' });
32+
3033

3134
export function TargetProps(props) {
3235
const {
@@ -45,15 +48,15 @@ export function TargetProps(props) {
4548
},
4649
{
4750
id: 'bindingType',
48-
component: withProps(Binding, { type: 'zeebe:CalledElement' }),
51+
component: CalledElementBinding,
4952
isEdited: isSelectEntryEdited
5053
}
5154
];
5255

5356
if (getBindingType(element, 'zeebe:CalledElement') === 'versionTag') {
5457
entries.push({
5558
id: 'versionTag',
56-
component: withProps(VersionTag, { type: 'zeebe:CalledElement' }),
59+
component: CalledElementVersionTag,
5760
isEdited: isTextFieldEntryEdited
5861
});
5962
}

0 commit comments

Comments
 (0)