Skip to content

Commit

Permalink
fix: handled null value on backspace
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik committed Jan 8, 2024
1 parent 9b4a268 commit 410117b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/widget/src/components/widget/Phases/Phase3/Phase3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function Phase3(props: IPhase3Props) {
isDoReviewLoading,
isReviewDataLoading,
showAllDataValidModal,
isDeleteRecordLoading,
isConfirmReviewLoading,
setShowAllDataValidModal,
} = usePhase3({ onNext: onNextClick });
Expand All @@ -66,7 +67,9 @@ export function Phase3(props: IPhase3Props) {

return (
<>
<LoadingOverlay visible={isReviewDataLoading || isDoReviewLoading || isConfirmReviewLoading} />
<LoadingOverlay
visible={isReviewDataLoading || isDoReviewLoading || isConfirmReviewLoading || isDeleteRecordLoading}
/>

<Stack ref={tableWrapperRef} style={{ flexGrow: 1 }} spacing="xs" align="flex-start">
<SegmentedControl
Expand All @@ -84,7 +87,7 @@ export function Phase3(props: IPhase3Props) {
onValueChange={(row, prop, oldVal, newVal) => {
const name = String(prop).replace('record.', '');
let formattedNewVal = newVal;
if (typeof newVal === null) formattedNewVal = '';
if (typeof newVal === 'object' || newVal === null) formattedNewVal = undefined;

const currentData = [...reviewData];
if (currentData && oldVal != formattedNewVal) {
Expand Down

0 comments on commit 410117b

Please sign in to comment.