Skip to content

Commit

Permalink
Do not select hidden elements
Browse files Browse the repository at this point in the history
  • Loading branch information
vitmalina committed Mar 22, 2024
1 parent c63f778 commit f642a01
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions dist/w2ui.es6.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* w2ui 2.0.x (nightly) (3/22/2024, 2:13:25 PM) (c) http://w2ui.com, [email protected] */
/* w2ui 2.0.x (nightly) (3/22/2024, 4:11:26 PM) (c) http://w2ui.com, [email protected] */
/**
* Part of w2ui 2.0 library
* - Dependencies: w2utils
Expand Down Expand Up @@ -8450,7 +8450,8 @@ class w2sidebar extends w2base {
let ind1 = Math.min(this.selected.map(sel => chain.indexOf(sel))) // first item in selection
let ind2 = chain.indexOf(id)
for (let i = Math.min(ind1, ind2); i < chain.length && i <= Math.max(ind1, ind2); i++) {
if (!this.selected.includes(chain[i])) {
let node = this.get(chain[i])
if (!this.selected.includes(chain[i]) && node.hidden != true) {
this.select(chain[i])
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/w2ui.es6.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/w2ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* w2ui 2.0.x (nightly) (3/22/2024, 2:13:25 PM) (c) http://w2ui.com, [email protected] */
/* w2ui 2.0.x (nightly) (3/22/2024, 4:11:26 PM) (c) http://w2ui.com, [email protected] */
/**
* Part of w2ui 2.0 library
* - Dependencies: w2utils
Expand Down Expand Up @@ -8450,7 +8450,8 @@ class w2sidebar extends w2base {
let ind1 = Math.min(this.selected.map(sel => chain.indexOf(sel))) // first item in selection
let ind2 = chain.indexOf(id)
for (let i = Math.min(ind1, ind2); i < chain.length && i <= Math.max(ind1, ind2); i++) {
if (!this.selected.includes(chain[i])) {
let node = this.get(chain[i])
if (!this.selected.includes(chain[i]) && node.hidden != true) {
this.select(chain[i])
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/w2ui.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/w2sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ class w2sidebar extends w2base {
let ind1 = Math.min(this.selected.map(sel => chain.indexOf(sel))) // first item in selection
let ind2 = chain.indexOf(id)
for (let i = Math.min(ind1, ind2); i < chain.length && i <= Math.max(ind1, ind2); i++) {
if (!this.selected.includes(chain[i])) {
let node = this.get(chain[i])
if (!this.selected.includes(chain[i]) && node.hidden != true) {
this.select(chain[i])
}
}
Expand Down

0 comments on commit f642a01

Please sign in to comment.