wj-elements 0.1.98 → 0.1.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,6 @@ class Checkbox extends WJElement {
23
23
  * @param {string} value - The value to set.
24
24
  */
25
25
  set value(value) {
26
- debugger;
27
26
  this.internals.setFormValue(value);
28
27
  if (this.input)
29
28
  this.input.value = value;
@@ -34,7 +33,6 @@ class Checkbox extends WJElement {
34
33
  */
35
34
  get value() {
36
35
  var _a;
37
- debugger;
38
36
  return ((_a = this.input) == null ? void 0 : _a.value) || "";
39
37
  }
40
38
  /**
@@ -409,6 +409,7 @@ class Select extends WJElement {
409
409
  * @param {number} length - The length of the selected options.
410
410
  */
411
411
  selectionChanged(option = null, length = 0) {
412
+ var _a, _b;
412
413
  if (this.hasAttribute("multiple")) {
413
414
  this.value = this.selectedOptions.map((el) => el.value).reverse();
414
415
  if (this.placeholder && length === 0) {
@@ -424,7 +425,7 @@ class Select extends WJElement {
424
425
  }
425
426
  } else {
426
427
  let value = (option == null ? void 0 : option.textContent.trim()) || "";
427
- this.value = value;
428
+ this.value = (_b = (_a = this.selectedOptions) == null ? void 0 : _a.map((el) => el.value)) == null ? void 0 : _b.at(0);
428
429
  this.input.value = value;
429
430
  if (option && option instanceof HTMLElement) {
430
431
  this.slotStart.innerHTML = "";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wj-elements",
3
3
  "description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
4
- "version": "0.1.98",
4
+ "version": "0.1.99",
5
5
  "homepage": "https://github.com/lencys/wj-elements",
6
6
  "author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
7
7
  "license": "MIT",