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

219 - added dropTargetClasses to keyboard config #220

Merged
merged 3 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dist"
],
"description": "*An awesome drag and drop library for Svelte 3 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *",
"version": "0.8.0",
"version": "0.8.1",
"repository": {
"type": "git",
"url": "git+https://github.com/isaacHagoel/svelte-dnd-action.git"
Expand Down
4 changes: 4 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ This change makes the initial behaviour of large items (relative to their peers)
### [v0.8.0](https://github.com/isaacHagoel/svelte-dnd-action/pull/218)

Added a new option, `dropTargetClasses`, that allows adding global classes to a dnd-zone when it is a potential drop target (during drag).

### [0.8.1](https://github.com/isaacHagoel/svelte-dnd-action/pull/220)

Made `dropTargetClasses` when initiating drag via keyboard
3 changes: 3 additions & 0 deletions src/keyboardAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export function dndzone(node, options) {
dragDisabled: false,
dropFromOthersDisabled: false,
dropTargetStyle: DEFAULT_DROP_TARGET_STYLE,
dropTargetClasses: [],
autoAriaDisabled: false
};

Expand Down Expand Up @@ -266,12 +267,14 @@ export function dndzone(node, options) {
dragDisabled = false,
dropFromOthersDisabled = false,
dropTargetStyle = DEFAULT_DROP_TARGET_STYLE,
dropTargetClasses = [],
autoAriaDisabled = false
}) {
config.items = [...items];
config.dragDisabled = dragDisabled;
config.dropFromOthersDisabled = dropFromOthersDisabled;
config.dropTargetStyle = dropTargetStyle;
config.dropTargetClasses = dropTargetClasses;
config.autoAriaDisabled = autoAriaDisabled;
if (!autoAriaDisabled) {
node.setAttribute("aria-disabled", dragDisabled);
Expand Down