Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
AutosaveIndicator.md 573 B

Display the status of the form (Saving in progress, Saved or Error while saving)

Saving in progress. The indicator will be hidden after a certain delay.

const autosave = {
  isFetching: true
};
 
<AutosaveIndicator delay={4000} autosave={autosave} />

Changes saved.

const autosave = {
  isFetching: false,
  lastUpdate: new Date(),
};

<AutosaveIndicator autosave={autosave} />

Error saving changes.

const autosave = {
  isFetching: false,
  error: 'Something went wrong. Please try again.',
};

<AutosaveIndicator autosave={autosave} />