fix: update GridlerStore setState type to accept full state values
fix: change defaultItems type in GlidlerFormAdaptor to use MantineBetterMenuInstanceItem[] test: update global ResizeObserver and IntersectionObserver mocks to use globalThis build: change moduleResolution to 'bundler' in tsconfig.app.json build: add missing newline at end of file in tsconfig.node.json
This commit is contained in:
@@ -202,7 +202,7 @@ export interface GridlerState {
|
||||
renderColumns?: GridlerColumns;
|
||||
setState: <K extends keyof GridlerStoreState>(
|
||||
key: K,
|
||||
value: Partial<GridlerStoreState[K]>
|
||||
value: GridlerStoreState[K]
|
||||
) => void;
|
||||
setStateFN: <K extends keyof GridlerStoreState>(
|
||||
key: K,
|
||||
|
||||
@@ -59,8 +59,8 @@ export function GlidlerFormAdaptor(props: {
|
||||
storeState: GridlerState,
|
||||
row?: Record<string, unknown>,
|
||||
col?: GridlerColumn,
|
||||
defaultItems?: Array<unknown>
|
||||
) => {
|
||||
defaultItems?: MantineBetterMenuInstanceItem[]
|
||||
): MantineBetterMenuInstanceItem[] => {
|
||||
//console.log('GlidlerFormInterface getMenuItems', id);
|
||||
|
||||
if (id === 'header-menu') {
|
||||
|
||||
@@ -17,14 +17,14 @@ Object.defineProperty(window, 'matchMedia', {
|
||||
})
|
||||
|
||||
// Mock ResizeObserver
|
||||
global.ResizeObserver = vi.fn().mockImplementation(() => ({
|
||||
globalThis.ResizeObserver = vi.fn().mockImplementation(() => ({
|
||||
disconnect: vi.fn(),
|
||||
observe: vi.fn(),
|
||||
unobserve: vi.fn(),
|
||||
}))
|
||||
|
||||
// Mock IntersectionObserver
|
||||
global.IntersectionObserver = vi.fn().mockImplementation(() => ({
|
||||
globalThis.IntersectionObserver = vi.fn().mockImplementation(() => ({
|
||||
disconnect: vi.fn(),
|
||||
observe: vi.fn(),
|
||||
unobserve: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user