Skip to content

Commit

Permalink
Event assignment and lambda shift.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Troup committed Sep 6, 2024
1 parent 01e8e8a commit f6326b8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 42 deletions.
22 changes: 8 additions & 14 deletions dist/select.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var Config;
const o = r(n, t, e);
s(o);
u(o, false);
f(o);
a(o);
Trigger.customEvent(e.onRenderComplete, e._currentView.element);
}
} else {
Expand Down Expand Up @@ -280,9 +280,7 @@ var Config;
multiSelectEnabled: n.hasAttribute("multiple")
};
if (!o.showDropDownButton) {
i.onclick = function() {
a(l);
};
i.onclick = () => f(l);
}
t.push(l);
return l;
Expand All @@ -294,9 +292,7 @@ var Config;
if (p(e)) {
t.classList.add("button-open");
}
t.onclick = function() {
a(e);
};
t.onclick = () => f(e);
}
}
function s(e) {
Expand All @@ -315,7 +311,7 @@ var Config;
if (o.selected) {
n.classList.add("selected");
}
n.onclick = function(o) {
n.onclick = o => {
DomElement.cancelBubble(o);
if (!e.multiSelectEnabled) {
const t = e.select.options.length;
Expand Down Expand Up @@ -367,23 +363,21 @@ var Config;
const o = DomElement.create("div", "remove");
o.innerHTML = e.bindingOptions.removeText;
n.appendChild(o);
o.onclick = function(n) {
o.onclick = n => {
DomElement.cancelBubble(n);
e.select.options[t].selected = false;
g(e);
u(e);
};
}
}
function f(e) {
const t = function() {
g(e);
};
function a(e) {
const t = () => g(e);
document.body.addEventListener("click", t);
window.addEventListener("resize", t);
window.addEventListener("click", t);
}
function a(e) {
function f(e) {
if (!p(e)) {
setTimeout((function() {
e.dropDown.style.display = "block";
Expand Down
2 changes: 1 addition & 1 deletion dist/select.esm.js.map

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions dist/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ var Config;
const o = r(n, t, e);
l(o);
u(o, false);
f(o);
a(o);
Trigger.customEvent(e.onRenderComplete, e._currentView.element);
}
} else {
Expand Down Expand Up @@ -282,9 +282,7 @@ var Config;
multiSelectEnabled: n.hasAttribute("multiple")
};
if (!o.showDropDownButton) {
i.onclick = function() {
a(s);
};
i.onclick = () => f(s);
}
t.push(s);
return s;
Expand All @@ -296,9 +294,7 @@ var Config;
if (p(e)) {
t.classList.add("button-open");
}
t.onclick = function() {
a(e);
};
t.onclick = () => f(e);
}
}
function l(e) {
Expand All @@ -317,7 +313,7 @@ var Config;
if (o.selected) {
n.classList.add("selected");
}
n.onclick = function(o) {
n.onclick = o => {
DomElement.cancelBubble(o);
if (!e.multiSelectEnabled) {
const t = e.select.options.length;
Expand Down Expand Up @@ -369,23 +365,21 @@ var Config;
const o = DomElement.create("div", "remove");
o.innerHTML = e.bindingOptions.removeText;
n.appendChild(o);
o.onclick = function(n) {
o.onclick = n => {
DomElement.cancelBubble(n);
e.select.options[t].selected = false;
g(e);
u(e);
};
}
}
function f(e) {
const t = function() {
g(e);
};
function a(e) {
const t = () => g(e);
document.body.addEventListener("click", t);
window.addEventListener("resize", t);
window.addEventListener("click", t);
}
function a(e) {
function f(e) {
if (!p(e)) {
setTimeout((function() {
e.dropDown.style.display = "block";
Expand Down
2 changes: 1 addition & 1 deletion dist/select.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f6326b8

Please sign in to comment.