mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-27 22:32:49 +03:00
parent
1ff31a90f4
commit
2edab3fa2c
@ -79,6 +79,8 @@ export const ViewPickerCreateOrEditContent = () => {
|
||||
|
||||
const { handleCreate, handleUpdate } = useViewPickerPersistView();
|
||||
|
||||
const { availableFieldsForKanban } = useGetAvailableFieldsForKanban();
|
||||
|
||||
useScopedHotkeys(
|
||||
Key.Enter,
|
||||
async () => {
|
||||
@ -86,6 +88,12 @@ export const ViewPickerCreateOrEditContent = () => {
|
||||
return;
|
||||
}
|
||||
if (viewPickerMode === 'create') {
|
||||
if (
|
||||
viewPickerType === ViewType.Kanban &&
|
||||
availableFieldsForKanban.length === 0
|
||||
) {
|
||||
return;
|
||||
}
|
||||
await handleCreate();
|
||||
}
|
||||
if (viewPickerMode === 'edit') {
|
||||
@ -100,8 +108,6 @@ export const ViewPickerCreateOrEditContent = () => {
|
||||
setViewPickerSelectedIcon(iconKey);
|
||||
};
|
||||
|
||||
const { availableFieldsForKanban } = useGetAvailableFieldsForKanban();
|
||||
|
||||
const handleClose = async () => {
|
||||
if (viewPickerMode === 'edit') {
|
||||
await handleUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user