Skip to content

Commit

Permalink
fix(zeebe): don't create new _Binding_ and _Version tag_ on rerender
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Sep 11, 2024
1 parent 8a4cacc commit 457db30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/provider/zeebe/properties/CalledDecisionProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { FeelEntryWithVariableContext } from '../../../entries/FeelEntryWithCont

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

const CalledDecisionBinding = withProps(Binding, { type: 'zeebe:CalledDecision' }),
CalledDecisionVersionTag = withProps(VersionTag, { type: 'zeebe:CalledDecision' });


export function CalledDecisionProps(props) {
const {
Expand All @@ -45,15 +48,15 @@ export function CalledDecisionProps(props) {
},
{
id: 'bindingType',
component: withProps(Binding, { type: 'zeebe:CalledDecision' }),
component: CalledDecisionBinding,
isEdited: isSelectEntryEdited
}
];

if (getBindingType(element, 'zeebe:CalledDecision') === 'versionTag') {
entries.push({
id: 'versionTag',
component: withProps(VersionTag, { type: 'zeebe:CalledDecision' }),
component: CalledDecisionVersionTag,
isEdited: isTextFieldEntryEdited
});
}
Expand Down
7 changes: 5 additions & 2 deletions src/provider/zeebe/properties/FormProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ import {

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

const FormDefinitionBinding = withProps(Binding, { type: 'zeebe:FormDefinition' }),
FormDefinitionVersionTag = withProps(VersionTag, { type: 'zeebe:FormDefinition' });

const NONE_VALUE = 'none';


Expand Down Expand Up @@ -87,14 +90,14 @@ export function FormProps(props) {
if (formType === FORM_TYPES.CAMUNDA_FORM_LINKED) {
entries.push({
id: 'bindingType',
component: withProps(Binding, { type: 'zeebe:FormDefinition' }),
component: FormDefinitionBinding,
isEdited: isSelectEntryEdited
});

if (getBindingType(element, 'zeebe:FormDefinition') === 'versionTag') {
entries.push({
id: 'versionTag',
component: withProps(VersionTag, { type: 'zeebe:FormDefinition' }),
component: FormDefinitionVersionTag,
isEdited: isTextFieldEntryEdited
});
}
Expand Down
7 changes: 5 additions & 2 deletions src/provider/zeebe/properties/TargetProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { FeelEntryWithVariableContext } from '../../../entries/FeelEntryWithCont

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

const CalledElementBinding = withProps(Binding, { type: 'zeebe:CalledElement' }),
CalledElementVersionTag = withProps(VersionTag, { type: 'zeebe:CalledElement' });


export function TargetProps(props) {
const {
Expand All @@ -45,15 +48,15 @@ export function TargetProps(props) {
},
{
id: 'bindingType',
component: withProps(Binding, { type: 'zeebe:CalledElement' }),
component: CalledElementBinding,
isEdited: isSelectEntryEdited
}
];

if (getBindingType(element, 'zeebe:CalledElement') === 'versionTag') {
entries.push({
id: 'versionTag',
component: withProps(VersionTag, { type: 'zeebe:CalledElement' }),
component: CalledElementVersionTag,
isEdited: isTextFieldEntryEdited
});
}
Expand Down

0 comments on commit 457db30

Please sign in to comment.