select

Better select widgets in vanilla javascript.  https://p.ce9e.org/select/demo/
git clone https://git.ce9e.org/select.git

commit
7c147bb206e4522c9feb095db3d3d239c80990ba
parent
204638fdb8e61aad71cda8430030d7ebcb3a2369
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2021-05-28 11:16
rename complete to forceAll

Diffstat

M select.js 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/select.js b/select.js

@@ -133,14 +133,14 @@ export class Select {
  133   133 		return li;
  134   134 	}
  135   135 
  136    -1 	open(complete) {
   -1   136 	open(forceAll) {
  137   137 		this.focus = 0;
  138   138 		this.dropdown.innerHTML = '';
  139   139 		this.indexMap = [];
  140   140 		var i = 0;
  141   141 		Array.from(this.original.children).forEach(child => {
  142   142 			if (child.tagName === 'OPTION') {
  143    -1 				if (child.label && (complete || this.isMatch(child.label))) {
   -1   143 				if (child.label && (forceAll || this.isMatch(child.label))) {
  144   144 					this.dropdown.append(this.createOption(child, i));
  145   145 				}
  146   146 				i += 1;
@@ -152,7 +152,7 @@ export class Select {
  152   152 				group.append(label);
  153   153 				group.append(ul);
  154   154 				Array.from(child.children).forEach(c => {
  155    -1 					if (c.label && (complete || this.isMatch(c.label))) {
   -1   155 					if (c.label && (forceAll || this.isMatch(c.label))) {
  156   156 						ul.append(this.createOption(c, i));
  157   157 					}
  158   158 					i += 1;