How to use the redux-form.isDirty 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 ealgis / ealgis / frontend / src / layer-editor / layer-form / LayerFormContainer.tsx View on Github external
} else if (component === "filter-expression") {
            return eVisibleComponent.FILTER_EXPRESSION
        }
        return eVisibleComponent.LAYER_FORM
    }

    return {
        tabName: ownProps.params.tabName,
        mapDefinition: maps[ownProps.params.mapId],
        layerId: ownProps.params.layerId,
        layerDefinition: maps[ownProps.params.mapId].json.layers[ownProps.params.layerId],
        layerFillColourScheme: layerFormValues(state, "fillColourScheme") as string,
        doFill: layerFormValues(state, "valueExpression") !== "",
        visibleComponent: getVisibleComponent(ownProps.params.component),
        dirtyFormModalOpen: app.modals.get("dirtyLayerForm") || false,
        isDirty: isDirty("layerForm")(state),
        geominfo: ealgis.geominfo,
        colourinfo: ealgis.colourinfo,
        layerFormSubmitting: layerform.submitting,
        muiThemePalette: ownProps.muiTheme.palette,
    }
}
github Automattic / wp-calypso / client / components / tinymce / plugins / simple-payments / dialog / form.jsx View on Github external
export const isProductFormDirty = state => isDirty( REDUX_FORM_NAME )( state );
github Automattic / wp-calypso / client / extensions / wp-job-manager / components / settings / pages / index.jsx View on Github external
const connectComponent = connect( state => {
	const siteId = getSelectedSiteId( state );

	return {
		dirty: isDirty( form ),
		isFetchingPages: isRequestingPostsForQuery( state, siteId, query ),
		siteId,
	};
} );
github Automattic / wp-calypso / client / extensions / wp-job-manager / components / settings / job-submission / index.jsx View on Github external
state => ( {
		dirty: isDirty( form ),
		enableRegistration: selector( state, 'account.enableRegistration' ),
		generateUsername: selector( state, 'account.generateUsername' ),
		submissionDuration: selector( state, 'duration.submissionDuration' ),
	} ),
	{ change }
github dnadesign / silverstripe-elemental / client / src / components / ElementEditor / Header.js View on Github external
function mapStateToProps(state, ownProps) {
  const formName = loadElementFormStateName(ownProps.element.ID);

  return {
    formDirty: isDirty(`element.${formName}`, getFormState)(state),
  };
}
github silverstripe / silverstripe-admin / client / src / boot / BootRoutes.js View on Github external
const changedForms = forms.filter((form) => {
      const schema = Object.values(schemas).find(item => item.name === form.name);

      const notify = schema && schema.state && schema.state.notifyUnsavedChanges;

      if (!notify) {
        return false;
      }

      return isDirty(form.name, getFormState)(state);
    });
github veritone / veritone-sdk / packages / veritone-widgets / src / shared / Wizard / index.js View on Github external
(state, ownProps) => ({
    isValid: isValid(ownProps.formName)(state),
    isDirty: isDirty(ownProps.formName)(state),
    submitErrors: getFormSubmitErrors(ownProps.formName)(state)
  }),
  {
github plouc / flambo / webapp / src / modules / settings / containers / SettingsContainer.js View on Github external
const mapStateToProps = state => {
    const {
        intl: { locale },
    } = state

    return {
        settings: {
            locale,
        },
        isDirty: isDirty('settings')(state),
    }
}
github i-novus-llc / n2o-framework / frontend / n2o / src / sagas / modals.js View on Github external
export function* checkOnDirtyForm(name) {
  let someOneDirtyForm = false;
  const state = yield select();
  const widgets = makePageWidgetsByIdSelector(name)(state);
  const widgetsKeys = keys(widgets);
  for (let i = 0; i < widgetsKeys.length; i++) {
    if (widgets[widgetsKeys[i]].src === 'FormWidget') {
      someOneDirtyForm = isDirty(widgetsKeys[i])(state);
    }
  }
  return someOneDirtyForm;
}