Fixing console errors and adding category modal
This commit is contained in:
@@ -36,7 +36,7 @@ export const CategoryEditModal = ({
|
||||
|
||||
return (
|
||||
<form onSubmit={form.onSubmit(handleSubmit)}>
|
||||
<TextInput data-autoFocus {...form.getInputProps('name')} label="Name of category" />
|
||||
<TextInput data-autoFocus {...form.getInputProps('name')} autoFocus />
|
||||
|
||||
<Group mt="md" grow>
|
||||
<Button onClick={() => context.closeModal(id)} variant="filled" color="gray">
|
||||
|
||||
@@ -210,6 +210,7 @@ export const useCategoryActions = (configName: string | undefined, category: Cat
|
||||
const edit = async () => {
|
||||
openContextModalGeneric<CategoryEditModalInnerProps>({
|
||||
modal: 'categoryEditModal',
|
||||
withCloseButton: false,
|
||||
innerProps: {
|
||||
category,
|
||||
onSuccess: async (category) => {
|
||||
|
||||
Reference in New Issue
Block a user