mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-30 11:27:55 +08:00
chore: fix switch view (#71)
* chore: fix switch view * chore: fix the issue of switch database view
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useDatabaseContext, useDatabaseViewId } from '@/application/database-yjs';
|
||||
import { useRenderFields } from '@/components/database/components/grid/grid-column';
|
||||
import GridVirtualizer from '@/components/database/components/grid/grid-table/GridVirtualizer';
|
||||
import { GridProvider } from '@/components/database/grid/GridProvider';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export function Grid () {
|
||||
export function Grid() {
|
||||
const { fields } = useRenderFields();
|
||||
const viewId = useDatabaseViewId();
|
||||
|
||||
@@ -18,13 +19,13 @@ export function Grid () {
|
||||
|
||||
return (
|
||||
<GridProvider>
|
||||
<div data-testid="database-grid" className={`database-grid relative grid-table-${viewId} flex w-full flex-1 flex-col`}>
|
||||
<GridVirtualizer
|
||||
columns={fields}
|
||||
/>
|
||||
<div
|
||||
data-testid='database-grid'
|
||||
className={`database-grid relative grid-table-${viewId} flex w-full flex-1 flex-col`}
|
||||
>
|
||||
<GridVirtualizer columns={fields} />
|
||||
</div>
|
||||
</GridProvider>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user