You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, the input box is draggable and will cause the multiselection break.
Also, is it possible to passing in a custom event to check when finish dragging & drop the element in the dndzone? Such as on:drop, on: on:finalize.
Tks a lot!
The text was updated successfully, but these errors were encountered:
Also can the outline style when dragging elements being removed?
The demo here can see that when dragging the elements, the style of dragging elements will be changed.
Hi @mskocik and thanks for this amazing library. I have observed another bug. I am not exactly sure if it is the same as the one described above. But the problem is, that the "placeholder" text can be also dragged, but if that happens there is an error an you need to reload the window to be able to drag again the items.
I have fixed this locally by a small hack in src/components/Control.svelte where I set dragDisabled: true if the length of the selectedOptions is less than 1:
// prevent dragging if there are no selected items
// to solve the bug when trying to drag an empty selection
$: dragDisabled = selectedOptions.length < 1;
</script>
<divclass="sv-control"class:is-active={$hasFocus}
class:is-disabled={disabled}
on:mousedown|preventDefaulton:click|preventDefault={focusControl}
>
<slotname="icon" />
<!-- selection & input -->
<divclass="sv-content sv-input-row"class:has-multiSelection={multiple}
use:dndzone={{
items: selectedOptions,
flipDurationMs,
type: inputId,
dragDisabled: dragDisabled,
}}
on:consideron:finalize
>
This is probably not the best way of doing it but I just thought I would share.
As you can see, the input box is draggable and will cause the multiselection break.
Also, is it possible to passing in a custom event to check when finish dragging & drop the element in the dndzone? Such as on:drop, on: on:finalize.
Tks a lot!
The text was updated successfully, but these errors were encountered: