How to use the dot-prop-immutable.get function in dot-prop-immutable

To help you get started, we’ve selected a few dot-prop-immutable 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 greymass / eos-voter / app / shared / containers / Global / Account / Fragment / Ram / Max.js View on Github external
const mapStateToProps = (state, ownProps) => {
  const account = ownProps.account.replace('.', '\\.');
  return {
    used: get(state.accounts, `${account}.ram_usage`),
    max: get(state.accounts, `${account}.ram_quota`),
  };
};
github greymass / eos-voter / app / modules / handler / containers / Prompt.js View on Github external
modifyWhitelist = (e, { index, name }) => {
    const { whitelist } = this.state;
    const current = get(whitelist, `flexible.${index}.${name}`, false);
    const modified = set(whitelist, `flexible.${index}.${name}`, !current);
    this.setState({ whitelist: modified });
  }
  onShareLink = () => this.setState({ displayShareLink: !this.state.displayShareLink })
github greymass / eos-voter / app / shared / components / Producers / Proxies / Modal / Info / Details.js View on Github external
<header>
              {t('producers_info_links')}
            </header>
            
              
                
              
              
                
              
              
                
              
            
            <header>
              {t('producers_info_social')}
            </header>
            <div>
              {this.socialLink('steemit')}</div>
github indix / formland / src / index.tsx View on Github external
return configs.map((config, i) =&gt; {
      if (config.type === 'group') {
        return this.getFormGroup(config, callbacks, store)
      }
      if (config.isHidden &amp;&amp; config.isHidden(store)) {
        return false
      }
      if (!config.resultPath) {
        return new Error(`Provide a resultPath in config[${i}]`)
      }
      const value = dotObject.get(store, config.resultPath, undefined)
      const error = this.validateField(value, config)
      this.errors[groupId] = this.errors[groupId] || []
      this.errors[groupId][i] = {
        id: config.id,
        error,
      }
      const props = {
        config,
        value,
        callbacks: this.bindCallbacks(config, callbacks),
      }

      const Element: any = this.getFormElement(config.type)

      return (
github webiny / webiny-js / packages / webiny-app-page-builder / src / admin / components / withSavedElements / withSavedElements.js View on Github external
props: ({ data }) => {
            if (data.loading) {
                return { elements: null };
            }

            const elements = get(data, "pageBuilder.elements.data");
            if (!elementsAdded) {
                elements.forEach(el => {
                    if (el.type === "element") {
                        createElementPlugin(el);
                    } else {
                        createBlockPlugin(el);
                    }
                });
                elementsAdded = true;
            }

            return { elements };
        }
    });
github greymass / eos-voter / app / shared / components / Tools / BidName.js View on Github external
tick() {
    const {
      actions,
      settings
    } = this.props;

    const {
      openModal
    } = this.state;

    const {
      getBidForName
    } = actions;

    if (!openModal) {
      (get(settings, `recentBids.${settings.chainId}.${settings.account}`) || []).forEach((bid) => {
        getBidForName(bid.newname);
      });
    }
  }
github greymass / eos-voter / app / shared / containers / Global / Account / Fragment / Staleness.js View on Github external
const mapStateToProps = (state, ownProps) => {
  const account = ownProps.account.replace('.', '\\.');
  return {
    currentHeight: get(state, 'chain.head_block_num'),
    lastHeight: get(state, `accounts.${account}.head_block_num`),
    lastUpdate: get(state, `accounts.${account}.head_block_time`),
  };
};

dot-prop-immutable

Immutable version of dot-prop with some extensions

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis