mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge branch 'main' into release-rebase-1/platformv20
This commit is contained in:
commit
84d9661a1e
5 changed files with 30 additions and 4 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
2.66.1
|
||||
2.66.2
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.66.1
|
||||
2.66.2
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,12 @@ const EditorComponent = (props) => {
|
|||
if (!isVersionReleased && selectedComponents?.length > 1) {
|
||||
let newDefinition = JSON.parse(JSON.stringify(appDefinition));
|
||||
|
||||
removeSelectedComponent(currentPageId, newDefinition, selectedComponents, appDefinitionChanged);
|
||||
const toDeleteComponents = removeSelectedComponent(
|
||||
currentPageId,
|
||||
newDefinition,
|
||||
selectedComponents,
|
||||
appDefinitionChanged
|
||||
);
|
||||
const platform = navigator?.userAgentData?.platform || navigator?.platform || 'unknown';
|
||||
if (platform.toLowerCase().indexOf('mac') > -1) {
|
||||
toast('Selected components deleted! (⌘ + Z to undo)', {
|
||||
|
|
@ -1595,6 +1600,26 @@ const EditorComponent = (props) => {
|
|||
icon: '🗑️',
|
||||
});
|
||||
}
|
||||
|
||||
const allAppHints = useResolveStore.getState().suggestions.appHints ?? [];
|
||||
const allHintsAssociatedWithQuery = [];
|
||||
|
||||
if (allAppHints.length > 0) {
|
||||
toDeleteComponents.forEach((id) => {
|
||||
const componentName = appDefinition.pages[currentPageId].components[id]?.component?.name;
|
||||
if (componentName) {
|
||||
allAppHints.forEach((suggestion) => {
|
||||
if (suggestion?.hint.includes(componentName)) {
|
||||
allHintsAssociatedWithQuery.push(suggestion.hint);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
useResolveStore.getState().actions.removeEntitiesFromMap(toDeleteComponents);
|
||||
useResolveStore.getState().actions.removeAppSuggestions(allHintsAssociatedWithQuery);
|
||||
|
||||
updateEditorState({ selectedComponents: [] });
|
||||
} else if (isVersionReleased) {
|
||||
useAppVersionStore.getState().actions.enableReleasedVersionPopupState();
|
||||
|
|
|
|||
|
|
@ -2098,6 +2098,7 @@ export const removeSelectedComponent = (pageId, newDefinition, selectedComponent
|
|||
useResolveStore.getState().actions.removeAppSuggestions(allHintsAssociatedWithQuery);
|
||||
|
||||
updateAppDefinition(newDefinition, { componentDefinitionChanged: true, componentDeleted: true, componentCut: true });
|
||||
return toDeleteComponents;
|
||||
};
|
||||
|
||||
const getSelectedText = () => {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.66.1
|
||||
2.66.2
|
||||
|
|
|
|||
Loading…
Reference in a new issue