Load empty board if view type is kanban (#3605)

* Load empty board if view type is kanban

* Fix tests

* Revert
This commit is contained in:
Charles Bochet
2024-01-24 16:17:47 +01:00
committed by GitHub
parent c811206c47
commit ccbf773fd4
21 changed files with 210 additions and 124 deletions

View File

@ -15,6 +15,7 @@ import { ViewScope } from '@/views/scopes/ViewScope';
import { ViewField } from '@/views/types/ViewField';
import { ViewFilter } from '@/views/types/ViewFilter';
import { ViewSort } from '@/views/types/ViewSort';
import { ViewType } from '@/views/types/ViewType';
import { ViewsHotkeyScope } from '../types/ViewsHotkeyScope';
@ -30,6 +31,7 @@ export type ViewBarProps = {
onViewSortsChange?: (sorts: ViewSort[]) => void | Promise<void>;
onViewFiltersChange?: (filters: ViewFilter[]) => void | Promise<void>;
onViewFieldsChange?: (fields: ViewField[]) => void | Promise<void>;
onViewTypeChange?: (viewType: ViewType) => void | Promise<void>;
};
export const ViewBar = ({
@ -40,12 +42,13 @@ export const ViewBar = ({
onViewFieldsChange,
onViewFiltersChange,
onViewSortsChange,
onViewTypeChange,
}: ViewBarProps) => {
const { openDropdown: openOptionsDropdownButton } = useDropdown(
optionsDropdownScopeId,
);
const { upsertViewSort, upsertViewFilter } = useViewBar({
viewBarId: viewBarId,
viewBarId,
});
const { objectNamePlural } = useParams();
@ -58,6 +61,7 @@ export const ViewBar = ({
onViewFieldsChange={onViewFieldsChange}
onViewFiltersChange={onViewFiltersChange}
onViewSortsChange={onViewSortsChange}
onViewTypeChange={onViewTypeChange}
>
<ViewBarEffect />
<ViewBarFilterEffect