Skip to content

Commit

Permalink
Fixed Hidden/Default category checkbox not populating (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
baoalvin1 committed Mar 13, 2021
1 parent d4521f9 commit c09d8fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/components/admin/PageAdminCategoriesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ const PageAdminCategoriesModalComponent: React.FC<PageAdminCategoriesModalProps>
<Form.Group>
<Form.Check
disabled={state.requesting}
checked={state.category.isDefault}
onChange={(event: any) => dispatch({
type: 'update-category',
category: {
...state.category,
isDefault: event.target.value === 'on',
isDefault: event.target.checked,
}
})}
type="checkbox"
Expand All @@ -178,11 +179,12 @@ const PageAdminCategoriesModalComponent: React.FC<PageAdminCategoriesModalProps>
<Form.Group>
<Form.Check
disabled={state.requesting}
checked={state.category.isHidden}
onChange={(event: any) => dispatch({
type: 'update-category',
category: {
...state.category,
isHidden: event.target.value === 'on',
isHidden: event.target.checked,
}
})}
type="checkbox"
Expand Down

0 comments on commit c09d8fa

Please sign in to comment.