remove parent (#70)

This commit is contained in:
Ayoub Ait Lachgar 2024-02-22 21:39:42 +01:00 committed by GitHub
parent 160f6dfecd
commit 514cd9ccec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,7 @@
import { useService } from 'bpmn-js-properties-panel';
import { SelectEntry } from '@bpmn-io/properties-panel';
import { isDataStoreReferenced, removeDataStore } from '../DataStoreHelpers';
import { getRoot } from '../../helpers';
export const OPTION_TYPE = {
data_stores: 'data_stores',
@ -33,7 +34,7 @@ export function DataStoreSelect(props) {
const process = businessObject.$parent;
const definitions = process.$parent;
const definitions = getRoot(businessObject);
if (!definitions.get('rootElements')) {
definitions.set('rootElements', []);
}
@ -92,14 +93,6 @@ export function DataStoreSelect(props) {
}
};
if (
!(optionType in spiffExtensionOptions) ||
spiffExtensionOptions[optionType] === null
) {
spiffExtensionOptions[optionType] = null;
requestOptions(eventBus, element, commandStack, optionType);
}
const getOptions = () => {
const optionList = [];
optionList.push({
@ -120,6 +113,15 @@ export function DataStoreSelect(props) {
return optionList;
};
if (
!(optionType in spiffExtensionOptions) ||
spiffExtensionOptions[optionType] === null
) {
spiffExtensionOptions[optionType] = null;
requestOptions(eventBus, element, commandStack, optionType);
}
return SelectEntry({
id,
element,