-
Notifications
You must be signed in to change notification settings - Fork 97
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
Allow dynamic drop action selection #107
base: master
Are you sure you want to change the base?
Allow dynamic drop action selection #107
Conversation
…allow dynamic selection of drop action based on given arguments (default drop action is now a no-op)
…efault drop action to provide a sensible default (component can be used without much coding)
…that use a copy action
OnSelectDropAction
to allow dynamic drop action selection…favor of child component approach
…nit only setters in `DropActionContext`
2ae6d77
to
1febece
Compare
…ine drop actions)
I understand the approach and it looks flexible. You can combine actions and even create your own actions. |
Yep, that's right. In this PR i'm primarily focusing on the initial issue title "Dropzone should not modify source and destination item list by default" which is the case when merging the PR. The provided actions in this package are basically a preset for consumers.
This info is currently passed via the
Imho this is primarily an issue of the Razor editor and it affects all components not just this package. One of the workarounds would be to start searching from the interface definition and then search for implementations. Another option would be to generate a documentation for the user from the classes etc.
The reason is to provide a easy get started experience. I always try to design components from the view of a consumer and that consumer might not want to add multiple lines of code to get started. Anyway, if you want to manipulate lists on your own then you don't register any drop action and handle |
Yep, makes sense. I like it. Currently all actions have the suffix DropAction. Might increase readability if we drop it.
What's your take? |
I named the actions with the suffix I like your suggestion at the first glance as it provides shorter names but it would violate established naming conventions and I think it is difficult to find a suitable name for the interface and base class now. What's you idea here? |
Don't worry about that - since you can implement several interfaces it does not make sense to have an interface decide about the naming of classes. I will take a close look at the weekend. |
@Postlagerkarte Any news from your side? 😉 |
EventCallback approach discussed inrelates to #106This approach tries not to break existing implementations by defaulting to a move action. However consumers that currently useCopyItem
parameter need to change the implementation as the callback that executes the actual copy is now assigned toCopyDropAction
.This approach uses child components to model drop actions.