From 0137f8cd54d6ac172704c20ff0e6a71f1ebd7d45 Mon Sep 17 00:00:00 2001 From: jayeshmangwani Date: Sun, 11 May 2025 11:23:03 +0530 Subject: [PATCH 1/2] removed bottom padding from FixedFooter of FeedbackSurvey --- src/components/FeedbackSurvey.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FeedbackSurvey.tsx b/src/components/FeedbackSurvey.tsx index 3c677a7b0f6d..08cadacf1962 100644 --- a/src/components/FeedbackSurvey.tsx +++ b/src/components/FeedbackSurvey.tsx @@ -134,7 +134,7 @@ function FeedbackSurvey({title, description, onSubmit, optionRowStyles, footerTe )} - + {!!footerText && footerText} Date: Sun, 11 May 2025 11:36:50 +0530 Subject: [PATCH 2/2] added canBeMissing to draft values and fixed namespce imports --- src/components/FeedbackSurvey.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/FeedbackSurvey.tsx b/src/components/FeedbackSurvey.tsx index 08cadacf1962..1d1210b2d2b2 100644 --- a/src/components/FeedbackSurvey.tsx +++ b/src/components/FeedbackSurvey.tsx @@ -4,7 +4,7 @@ import {View} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as FormActions from '@libs/actions/FormActions'; +import {clearDraftValues} from '@libs/actions/FormActions'; import CONST from '@src/CONST'; import type {FeedbackSurveyOptionID} from '@src/CONST'; import type ONYXKEYS from '@src/ONYXKEYS'; @@ -51,7 +51,7 @@ type FeedbackSurveyProps = { function FeedbackSurvey({title, description, onSubmit, optionRowStyles, footerText, isNoteRequired, isLoading, formID, enabledWhenOffline = true}: FeedbackSurveyProps) { const {translate} = useLocalize(); const styles = useThemeStyles(); - const [draft, draftResults] = useOnyx(`${formID}Draft`); + const [draft, draftResults] = useOnyx(`${formID}Draft`, {canBeMissing: true}); const [reason, setReason] = useState(draft?.reason); const [shouldShowReasonError, setShouldShowReasonError] = useState(false); @@ -88,7 +88,7 @@ function FeedbackSurvey({title, description, onSubmit, optionRowStyles, footerTe } onSubmit(draft.reason, draft.note?.trim()); - FormActions.clearDraftValues(formID); + clearDraftValues(formID); }; const handleSetNote = () => {