How to use the timm.removeAt 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 guigrpa / mady / src / client / components / aeSettings.js View on Github external
onRemoveListItem = (ev: SyntheticEvent) => {
    if (!(ev.currentTarget instanceof HTMLElement)) return;
    const [id, idx] = ev.currentTarget.id.split('.');
    const newList = timm.removeAt(this.state[id], Number(idx));
    this.setState({ [id]: newList });
  };
github guigrpa / mady / src / client / components / adTranslator.js View on Github external
removeLang(idx: number) {
    const nextLangs = timm.removeAt(this.state.langs, idx);
    this.updateLangs(nextLangs);
  }
github ThemeFuse / Brizy / public / editor-src / editor / js / component / Prompts / PromoptConditions / Triggers / index.jsx View on Github external
handleWrapperTriggerRemove = index =>
    this.setState({ values: removeAt(this.state.values, index) });
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / Tabs / Items.jsx View on Github external
removeItem(itemIndex) {
    const dbValue = this.getDBValue() || [];
    const updatedValue = removeAt(dbValue, itemIndex);

    this.handleTabActive(0);

    setTimeout(() => {
      this.handleValueChange(updatedValue, { arrayOperation: "remove" });
    }, 0);
  }
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / Accordion / Items.jsx View on Github external
removeItem(itemIndex) {
    const dbValue = this.getDBValue() || [];
    const updatedValue = removeAt(dbValue, itemIndex);

    this.handleAccordionActive(0);

    setTimeout(() => {
      this.handleValueChange(updatedValue, { arrayOperation: "remove" });
    }, 0);
  }
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / EditorArrayComponent.js View on Github external
removeItem(itemIndex) {
    const dbValue = this.getDBValue() || [];
    const updatedValue = removeAt(dbValue, itemIndex);

    this.handleValueChange(updatedValue, { arrayOperation: "remove" });
  }
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / Form / Input / types / Select.jsx View on Github external
handleOptionsRemove = index => {
    const options = removeAt(this.props.options, index);
    this.props.onChange({ options });
  };
  handleKeyUp = e => {