Skip to content

Commit

Permalink
Fix [Batch run] UI crash with "getBoundingClientRect" (#2149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mavdryk authored Dec 22, 2023
1 parent 51bb65c commit 9a7b598
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/FilterMenuModal/FilterMenuModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const FilterMenuModal = ({
)}
{applyButton && !withoutApplyButton && (
<Button
disabled={isEqual(filtersData.values, formState.values)}
disabled={isEqual(filtersData?.values, formState.values)}
id="filter-apply-btn"
variant={applyButton.variant}
label={applyButton.label}
Expand Down
17 changes: 10 additions & 7 deletions src/components/JobWizard/JobWizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,14 @@ const JobWizard = ({
const formStateRef = useRef(null)

const closeModal = useCallback(() => {
if (showSchedule) {
setShowSchedule(false)
}
dispatch(resetModalFilter(JOB_WIZARD_FILTERS))
removeJobFunction()
onResolve()
onWizardClose && onWizardClose()
}, [dispatch, onResolve, onWizardClose, removeJobFunction])
}, [dispatch, onResolve, onWizardClose, removeJobFunction, showSchedule])

const { handleCloseModal, resolveModal } = useModalBlockHistory(closeModal, formRef.current)

Expand Down Expand Up @@ -398,8 +401,8 @@ const JobWizard = ({
label: isBatchInference
? 'Schedule Infer'
: isTrain
? 'Schedule training job'
: 'Schedule for later',
? 'Schedule training job'
: 'Schedule for later',
onClick: () => {
formState.handleSubmit()

Expand All @@ -419,10 +422,10 @@ const JobWizard = ({
mode === PANEL_EDIT_MODE
? 'Save'
: isBatchInference
? 'Infer now'
: isTrain
? 'Run training now'
: 'Run',
? 'Infer now'
: isTrain
? 'Run training now'
: 'Run',
onClick: () => {
submitRequest(formState, false, goToFirstInvalidStep)
},
Expand Down

0 comments on commit 9a7b598

Please sign in to comment.