Skip to content

Commit

Permalink
🐛 fix(Sortable): ignore element may not be rendered during initializa…
Browse files Browse the repository at this point in the history
…tion (#2188)
  • Loading branch information
capdiem authored Oct 14, 2024
1 parent 48b9276 commit d0ca519
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Masa.Blazor.JS/src/proxies/sortable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ class SortableProxy {
delete rest.draggable;
}

const ignoreElements = [...this.el.querySelectorAll(ignore)];

this.sortable = new Sortable(el, {
...rest,
scroll: true,
onMove: (evt, originalEvent) => {
const ignoreElements = [...this.el.querySelectorAll(ignore)];
if (ignoreElements.length) {
let dragged: HTMLElement;
let target: HTMLElement;
Expand Down
Loading

0 comments on commit d0ca519

Please sign in to comment.