native-document 1.0.226 → 1.0.227

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.226",
3
+ "version": "1.0.227",
4
4
  "description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
5
5
  "author": "AfroCodeur <https://github.com/afrocodeur>",
6
6
  "license": "MIT",
@@ -134,4 +134,15 @@ List.prototype.setSelected = function(value) {
134
134
  }
135
135
  this.$description.selectedValues.set(value);
136
136
  return this;
137
+ };
138
+
139
+ /**
140
+ * @return {*}
141
+ */
142
+ List.prototype.selected = function() {
143
+ const values = this.$description.selectedValues.val();
144
+ if(this.$description.multiSelect.val()) {
145
+ return values;
146
+ }
147
+ return values[0];
137
148
  };
@@ -44,6 +44,7 @@ export interface ListInterface {
44
44
  onItemSelect(handler: (item: ListItemInterface) => void): this;
45
45
 
46
46
  setSelected(value: any): this;
47
+ selected(): any;
47
48
 
48
49
  // HasEventEmitter
49
50
  on(event: string, handler: (...args: unknown[]) => void): this;