Skip to content

Commit

Permalink
Allow usage of multiple select fields on Kanban board
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesBochet committed Mar 23, 2024
1 parent bd87182 commit 0a15994
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useRecoilValue } from 'recoil';

import { useObjectMetadataItemOnly } from '@/object-metadata/hooks/useObjectMetadataItemOnly';
import { useCreateOneRecord } from '@/object-record/hooks/useCreateOneRecord';
import { useDeleteOneRecord } from '@/object-record/hooks/useDeleteOneRecord';
Expand All @@ -6,7 +8,7 @@ import { RecordBoardActionBar } from '@/object-record/record-board/action-bar/co
import { RecordBoard } from '@/object-record/record-board/components/RecordBoard';
import { RecordBoardContextMenu } from '@/object-record/record-board/context-menu/components/RecordBoardContextMenu';
import { RecordBoardContext } from '@/object-record/record-board/contexts/RecordBoardContext';
import { FieldMetadataType } from '~/generated-metadata/graphql';
import { recordIndexKanbanFieldMetadataIdState } from '@/object-record/record-index/states/recordIndexKanbanFieldMetadataIdState';

type RecordIndexBoardContainerProps = {
recordBoardId: string;
Expand All @@ -23,8 +25,12 @@ export const RecordIndexBoardContainer = ({
objectNameSingular,
});

const recordIndexKanbanFieldMetadataId = useRecoilValue(
recordIndexKanbanFieldMetadataIdState,
);

const selectFieldMetadataItem = objectMetadataItem.fields.find(
(field) => field.type === FieldMetadataType.Select,
(field) => field.id === recordIndexKanbanFieldMetadataId,
);

const { deleteOneRecord } = useDeleteOneRecord({ objectNameSingular });
Expand Down

0 comments on commit 0a15994

Please sign in to comment.