neo.mjs 4.4.18 → 4.4.19

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": "neo.mjs",
3
- "version": "4.4.18",
3
+ "version": "4.4.19",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -226,6 +226,17 @@ class Select extends Picker {
226
226
  beforeSetStore(value, oldValue) {
227
227
  oldValue?.destroy();
228
228
 
229
+ // to reduce boilerplate code, a store config object without a defined model should default
230
+ // to displayField & valueField defaults
231
+ if (Neo.typeOf(value) === 'Object' && !value.model) {
232
+ value.model = {
233
+ fields: [
234
+ {name: 'id', type: 'String'},
235
+ {name: 'name', type: 'String'}
236
+ ]
237
+ }
238
+ }
239
+
229
240
  return ClassSystemUtil.beforeSetInstance(value, Store);
230
241
  }
231
242