@@ -722,7 +722,7 @@ function MultiLoaderTreeMockAsync(args) {
722
722
let [ isDocumentsLoading , setDocumentsLoading ] = useState ( false ) ;
723
723
724
724
let onRootLoadMore = useCallback ( ( ) => {
725
- if ( ! isRootLoading ) {
725
+ if ( ! isRootLoading && rootData . items . length < 30 ) {
726
726
action ( 'root loading' ) ( ) ;
727
727
setRootLoading ( true ) ;
728
728
setTimeout ( ( ) => {
@@ -738,7 +738,7 @@ function MultiLoaderTreeMockAsync(args) {
738
738
} , [ isRootLoading , rootData , args . delay ] ) ;
739
739
740
740
let onProjectsLoadMore = useCallback ( ( ) => {
741
- if ( ! isProjectsLoading ) {
741
+ if ( ! isProjectsLoading && projectsData . items . length < 30 ) {
742
742
action ( 'projects loading' ) ( ) ;
743
743
setProjectsLoading ( true ) ;
744
744
setTimeout ( ( ) => {
@@ -754,7 +754,7 @@ function MultiLoaderTreeMockAsync(args) {
754
754
} , [ isProjectsLoading , projectsData , args . delay ] ) ;
755
755
756
756
let onProjectsLevel3LoadMore = useCallback ( ( ) => {
757
- if ( ! isProjectsLevel3Loading ) {
757
+ if ( ! isProjectsLevel3Loading && projects3Data . items . length < 30 ) {
758
758
action ( 'projects level 3 loading' ) ( ) ;
759
759
setProjects3Loading ( true ) ;
760
760
setTimeout ( ( ) => {
@@ -770,7 +770,7 @@ function MultiLoaderTreeMockAsync(args) {
770
770
} , [ isProjectsLevel3Loading , projects3Data , args . delay ] ) ;
771
771
772
772
let onDocumentsLoadMore = useCallback ( ( ) => {
773
- if ( ! isDocumentsLoading ) {
773
+ if ( ! isDocumentsLoading && documentsData . items . length < 30 ) {
774
774
action ( 'documents loading' ) ( ) ;
775
775
setDocumentsLoading ( true ) ;
776
776
setTimeout ( ( ) => {
@@ -797,7 +797,6 @@ function MultiLoaderTreeMockAsync(args) {
797
797
if ( item . id === 'projects' ) {
798
798
return (
799
799
< StaticTreeItem id = "projects" textValue = "Projects" title = "Projects" >
800
-
801
800
< Collection items = { projectsData . items } >
802
801
{ ( item : any ) => {
803
802
return item . id !== 'projects-1' ?
0 commit comments