import { ErrorPersistResult, SuccessfulPersistResult, SugaredRelativeSingleField } from '@contember/binding'; export type PersistOnFieldChangeProps = { /** * The field that should trigger persist when changed. */ field: SugaredRelativeSingleField['field']; /** * Callback that is called when persist is successful. */ onPersistSuccess?: (result: SuccessfulPersistResult) => void; /** * Callback that is called when an error occurs during persist. */ onPersistError?: (result: ErrorPersistResult) => void; }; /** * Triggers persist when the specified field changes. * This only works for scalar fields, for relations, see {@link PersistOnHasOneChange}. * * ## Props {@link PersistOnFieldChangeProps} * - field, ?onPersistError, ?onPersistSuccess * * ## Example * ```tsx * * ``` */ export declare const PersistOnFieldChange: React.NamedExoticComponent; //# sourceMappingURL=PersistOnFieldChange.d.ts.map