Skip to content

Commit 0cbfd7f

Browse files
committed
made classname optional props
1 parent 7d23a7e commit 0cbfd7f

File tree

2 files changed

+4
-5
lines changed
  • app/src
    • components/SelectOutput
    • views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm

2 files changed

+4
-5
lines changed

app/src/components/SelectOutput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TextOutput } from '@ifrc-go/ui';
33
import { isDefined } from '@togglecorp/fujs';
44

55
interface Props<VALUE, OPTION> {
6-
className: string;
6+
className?: string;
77
value: VALUE | undefined;
88
options: OPTION[] | undefined;
99
keySelector: (datum: OPTION) => VALUE;

app/src/views/CountryNsOverviewContextAndStructure/NationalSocietyLocalUnits/LocalUnitsFormModal/LocalUnitsForm/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,9 @@ function LocalUnitsForm(props: Props) {
446446
const showChanges = !isNewLocalUnit && !!localUnitDetailsResponse?.is_locked;
447447

448448
const hasDifference = useMemo(() => {
449-
if (!value || !previousData) {
449+
if (isNotDefined(value) || isNotDefined(previousData)) {
450450
return false;
451451
}
452-
453452
const newFormFields = getFormFields(value);
454453
const oldFormFields = getFormFields(previousData);
455454

@@ -462,8 +461,8 @@ function LocalUnitsForm(props: Props) {
462461
onClick={handleFormSubmit}
463462
disabled={
464463
!hasDifference
465-
|| addLocalUnitsPending
466-
|| updateLocalUnitsPending
464+
|| addLocalUnitsPending
465+
|| updateLocalUnitsPending
467466
}
468467
>
469468
{strings.submitButtonLabel}

0 commit comments

Comments
 (0)