How to use the tangy-form/util/loc.js.Loc.unflatten function in tangy-form

To help you get started, we’ve selected a few tangy-form 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 Tangerine-Community / Tangerine / editor / src / app / groups / location-list-editor / location-list-editor.component.ts View on Github external
async editItem() {
    const flatLocationList = Loc.flatten(this.locationList);
    const index = flatLocationList.locations.findIndex(location => location.id === this.form.id);
    flatLocationList.locations[index] = { ...flatLocationList.locations[index], ...this.form };
    this.locationList = Loc.unflatten(flatLocationList);
    await this.setLocationList(this.locationList);
    await this.saveLocationListToDisk();
    this.isItemMarkedForUpdate = false;
    this.hideLocationForm();
  }
  hideLocationForm() {