How to use the timm.mergeIn function in timm

To help you get started, we’ve selected a few timm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / ImageGallery / index.js View on Github external
handleValueChange(newValue, meta) {
    if (meta.patch.lightBox) {
      const { lightBox } = newValue;
      const items = newValue.items.map(el =>
        mergeIn(el, ["value"], {
          linkType: lightBox === "on" ? "lightBox" : "external",
          linkLightBox: lightBox
        })
      );

      newValue = mergeIn(newValue, ["items"], items);
    }

    super.handleValueChange(newValue, meta);
  }
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / ImageGallery / index.js View on Github external
const items = newValue.items.map(el =>
        mergeIn(el, ["value"], {
          linkType: lightBox === "on" ? "lightBox" : "external",
          linkLightBox: lightBox
        })
      );
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / Tabs / Items.jsx View on Github external
handleNavChange = (value, index) => {
    if (value === undefined) {
      this.removeItem(index);
    } else {
      const dbValue = this.getDBValue();
      const updatedValue = mergeIn(dbValue, [index, "value"], {
        labelText: value
      });

      this.handleValueChange(updatedValue, {
        arrayOperation: "itemChange"
      });
    }
  };