Skip to content

Commit

Permalink
Wrap inner part of ListView with AsyncModeProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Sep 3, 2021
1 parent ae02bc2 commit f39549a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/block-editor/src/components/list-view/branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { map, compact } from 'lodash';
*/

import { AsyncModeProvider } from '@wordpress/data';
import { Fragment } from '@wordpress/element';

/**
* Internal dependencies
Expand Down
6 changes: 3 additions & 3 deletions packages/block-editor/src/components/list-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { useMergeRefs } from '@wordpress/compose';
import { __experimentalTreeGrid as TreeGrid } from '@wordpress/components';
import { useDispatch } from '@wordpress/data';
import { AsyncModeProvider, useDispatch } from '@wordpress/data';
import {
useCallback,
useEffect,
Expand Down Expand Up @@ -131,7 +131,7 @@ function ListView(
);

return (
<>
<AsyncModeProvider value={ true }>
<ListViewDropIndicator
listViewRef={ elementRef }
blockDropTarget={ blockDropTarget }
Expand All @@ -152,7 +152,7 @@ function ListView(
/>
</ListViewContext.Provider>
</TreeGrid>
</>
</AsyncModeProvider>
);
}
export default forwardRef( ListView );

0 comments on commit f39549a

Please sign in to comment.