@elementor/editor-components 4.3.0-995 → 4.3.0-997

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2602,12 +2602,12 @@ async function getDocumentsMap(ids, cache) {
2602
2602
 
2603
2603
  // src/store/actions/load-components-overridable-props.ts
2604
2604
  var import_store21 = require("@elementor/store");
2605
- async function loadComponentsOverridableProps(componentIds) {
2606
- const unloadedIds = componentIds.filter((id) => !selectIsOverridablePropsLoaded((0, import_store21.__getState)(), id));
2607
- if (!unloadedIds.length) {
2605
+ async function loadComponentsOverridableProps(componentIds, { force = false } = {}) {
2606
+ const idsToLoad = force ? componentIds : componentIds.filter((id) => !selectIsOverridablePropsLoaded((0, import_store21.__getState)(), id));
2607
+ if (!idsToLoad.length) {
2608
2608
  return;
2609
2609
  }
2610
- const { data } = await apiClient.getOverridableProps(unloadedIds);
2610
+ const { data } = await apiClient.getOverridableProps(idsToLoad);
2611
2611
  (0, import_store21.__dispatch)(slice.actions.loadOverridableProps(data));
2612
2612
  }
2613
2613
 
@@ -2682,6 +2682,7 @@ async function switchToComponent(componentId, componentInstanceId, element) {
2682
2682
  setAsInitial: false,
2683
2683
  shouldScroll: false
2684
2684
  });
2685
+ await loadComponentsOverridableProps([componentId], { force: true });
2685
2686
  const currentDocumentContainer = (0, import_editor_elements8.getCurrentDocumentContainer)();
2686
2687
  const topLevelElement = currentDocumentContainer?.children?.[0];
2687
2688
  if (topLevelElement) {