Skip to content

Commit

Permalink
feat(large-models): cancel indeterminate loading icon if validation f…
Browse files Browse the repository at this point in the history
…ails
  • Loading branch information
benforshey committed Jan 3, 2025
1 parent a3b5454 commit 7b27eb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/app/components/document/form-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ const FormActions = ({
'There are broken links in your document, are you sure you want to save?'
)
) {
// not saving because we need to address broken links
setIsSaving(false)

return
}

Expand All @@ -115,6 +118,9 @@ const FormActions = ({
})

if (errors.length) {
// not saving because we need to address errors
setIsSaving(false)

// errors are printed above the save button, pushing it down. scroll it back
setTimeout(() => {
let errorPanel = document.querySelector('.rjsf > .panel.errors')
Expand Down

0 comments on commit 7b27eb3

Please sign in to comment.