Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving file (by dnd5) into not loaded lazyload content prevents from future loading that content. #988

Closed
Roinoss opened this issue Jan 12, 2020 · 1 comment

Comments

@Roinoss
Copy link

Roinoss commented Jan 12, 2020

Test in: https://wwwendt.de/tech/fancytree/demo/index.html#sample-multi-ext.html
Reproduce steps:
1.: Move another file or folder to "More.." folder.
1a.: If you drag over and wait few seconds its lazyload content, if you drop instantly:
2.: Dropped file/folder is added to "More.." folder but its content isn't loaded.
2a.: As 1a lazyloads content, behavior in 2. is probably unintended.

@Roinoss Roinoss changed the title Moving file into not loaded lazyload content prevents form future loading that content. :bug :dnd5 :lazyload Moving file (dnd5) into not loaded lazyload content prevents form future loading that content. Jan 12, 2020
@Roinoss Roinoss changed the title Moving file (dnd5) into not loaded lazyload content prevents form future loading that content. Moving file (by dnd5) into not loaded lazyload content prevents form future loading that content. Jan 12, 2020
@mar10 mar10 changed the title Moving file (by dnd5) into not loaded lazyload content prevents form future loading that content. Moving file (by dnd5) into not loaded lazyload content prevents from future loading that content. Jan 25, 2020
@mar10 mar10 closed this as completed in 8e4f1c4 Jan 25, 2020
@Roinoss
Copy link
Author

Roinoss commented Jan 30, 2020

For me there should be also an option to just lazy load data for node before dropping:

				} else if (dndOpts.forceLoadLazyParents && !node.isLoaded()) {
					node.load();
				} else if (dndOpts.preventLazyParents && !node.isLoaded()) {
					node.warn("Drop over unloaded target node prevented.");
					DRAG_ENTER_RESPONSE = false;
					break;
				}

(ofc similar code in dragDrop also do a job:

if(!node.isLoaded()) {
    node.load().done(dropHere(data, node));
} else {
   dropHere(data, node) ;
}

function dropHere(data, node) {
 //do something on drop
}

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants