Skip to content

Commit

Permalink
fix(ui): autosave wasnt firing on first change (#10256)
Browse files Browse the repository at this point in the history
Fixes #10111
  • Loading branch information
jmikrut authored Dec 30, 2024
1 parent fe010b9 commit ef7242c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/ui/src/elements/Autosave/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const Autosave: React.FC<Props> = ({ id, collection, global: globalDoc })
const versionsConfig = docConfig?.versions

const [fields] = useAllFormFields()
const formModified = useFormModified()
const modified = useFormModified()
const { code: locale } = useLocale()
const { i18n, t } = useTranslation()

Expand All @@ -69,7 +69,6 @@ export const Autosave: React.FC<Props> = ({ id, collection, global: globalDoc })

const [saving, setSaving] = useState(false)
const debouncedFields = useDebounce(fields, interval)
const modified = useDebounce(formModified, interval)
const fieldRef = useRef(fields)
const modifiedRef = useRef(modified)
const localeRef = useRef(locale)
Expand Down

0 comments on commit ef7242c

Please sign in to comment.