How to use the redux-form.change function in redux-form

To help you get started, we’ve selected a few redux-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 webRunes / WRIO-InternetOS / src / CoreEditor / epics / imagePreview.js View on Github external
const dispatchFormActions = (title, description) =>
  Observable.concat(
    // Fire 2 actions, one after the other
    Observable.of(change('imageDialog', 'title', title)),
    Observable.of(change('imageDialog', 'description', description)),
    Observable.of({ type: actions.IMAGE_DIALOG_PREVIEW_SUCCESS }),
  );
github zhuyst / SkyBlog / client_web / src / component / article / content / edit / ArticleEditor.js View on Github external
setArticleForm : article => {
            dispatch(change(FORM_ARTICLE,"id",article.id));
            dispatch(change(FORM_ARTICLE,"title",article.title));
            dispatch(change(FORM_ARTICLE,"classify_id",article.classify_id));
            dispatch(change(FORM_ARTICLE,"sub_title",article.sub_title));
            dispatch(change(FORM_ARTICLE,"content",article.content));
        },
        insertArticle : (article,back) => {
github amovah / speedster / src / helpers / gatherInfo.js View on Github external
let category;
      for (const cate of categories) {
        if (cate.extensions.includes(extname(modified.name).toLowerCase())) {
          category = cate.name;
        }
      }
      if (!category) {
        category = 'Others';
      }
      modified.category = category;

      modified.outputDir = resolve(store.getState().setting.downloadDir, category);

      store.dispatch(change('addUrl', 'data', modified));
      store.dispatch(change('addUrl', 'maxConnection', 16));
      store.dispatch(change('addUrl', 'outputDir', modified.outputDir));
      store.dispatch(change('addUrl', 'maxSpeed', null));

      return modified;
    }

    await sleep(500);
    count = count - 1;
  }

  return null;
};
github superdesk / superdesk-planning / client / components / CoverageDetails / index.jsx View on Github external
changeCoverageStatusPlanned: () =>
        (dispatch(change(FORM_NAMES.PlanningForm, ownProps.coverage + '.news_coverage_status',
            {qcode: 'ncostat:int'}))),
});
github ETCDEVTeam / emerald-wallet / src / components / tx / SendTx / CreateTx / create.js View on Github external
onEntireBalance: (balance: TokenUnits, fee, isToken) => {
      if (balance) {
        let value;
        if (isToken) {
          value = balance.getDecimalized();
        } else {
          const wei = BigNumber.max(balance.value.sub(fee.value), new BigNumber(0));
          value = new TokenUnits(wei, 18).getDecimalized();
        }
        dispatch(change('createTx', 'value', value));
      }
    },
    onChangeGasLimit: (event, value) => {
github opennode / waldur-homeport / src / rancher / VolumeMountPointGroup.tsx View on Github external
return () => {
    const minSize = getMinSize(mountPoint);
    if (!minSize) {
      return;
    }
    if (!volumeSize || volumeSize < minSize) {
      dispatch(change(FORM_ID, sizeField, minSize));
    }
  };
};
github lemonCMS / redux-form-generator / src / types / resource.js View on Github external
}, () => {

      if (_.has(this.props, 'formKey')) {
        this.props.dispatch(changeWithKey(this.props.formName, this.props.formKey, this.props.field.name, _.uniq(values)));
      } else {
        this.props.dispatch(change(this.props.formName, this.props.field.name, _.uniq(values)));
      }
    });
  }
github arleighdickerson / y2redux / src / routes / Contact / modules / contact.js View on Github external
export function setCaptcha(value = false) {
  return change(FORM_NAME, 'recaptcha', value)
}
github service-bot / servicebot / views / components / elements / forms / service-template-form-refactored.jsx View on Github external
"changeMember" : (member, val) => {
            dispatch(change(TEMPLATE_FORM_NAME, member, val));
        }
    }