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