neo.mjs 6.3.1 → 6.3.3
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/apps/ServiceWorker.mjs
CHANGED
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -236,12 +236,12 @@ const DefaultConfig = {
|
|
236
236
|
useVdomWorker: true,
|
237
237
|
/**
|
238
238
|
* buildScripts/injectPackageVersion.mjs will update this value
|
239
|
-
* @default '6.3.
|
239
|
+
* @default '6.3.3'
|
240
240
|
* @memberOf! module:Neo
|
241
241
|
* @name config.version
|
242
242
|
* @type String
|
243
243
|
*/
|
244
|
-
version: '6.3.
|
244
|
+
version: '6.3.3'
|
245
245
|
};
|
246
246
|
|
247
247
|
Object.assign(DefaultConfig, {
|
package/src/form/Container.mjs
CHANGED
@@ -263,22 +263,31 @@ class Container extends BaseContainer {
|
|
263
263
|
}
|
264
264
|
|
265
265
|
isCheckBox = Neo.form.field?.CheckBox && field instanceof Neo.form.field.CheckBox;
|
266
|
-
isRadio = Neo.form.field?.Radio
|
266
|
+
isRadio = Neo.form.field?.Radio && field instanceof Neo.form.field.Radio;
|
267
267
|
value = fieldConfigs.value;
|
268
268
|
|
269
|
-
if (isRadio) {
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
269
|
+
if (isCheckBox || isRadio) {
|
270
|
+
/*
|
271
|
+
* we want to only change the checked state, in case a value is set.
|
272
|
+
* since fields of the same group might need it too, we are cloning the fieldConfigs
|
273
|
+
*/
|
274
|
+
if (Object.hasOwn(fieldConfigs, 'value')) {
|
275
|
+
fieldConfigs = Neo.clone(fieldConfigs, true);
|
276
|
+
|
277
|
+
if (isRadio) {
|
278
|
+
fieldConfigs.checked = field.value === value
|
279
|
+
} else if (isCheckBox) {
|
280
|
+
if (Neo.typeOf(value) === 'Array') {
|
281
|
+
if (value.includes(field.value)) {
|
282
|
+
fieldConfigs.checked = true
|
283
|
+
}
|
284
|
+
} else {
|
285
|
+
fieldConfigs.checked = field.value === value
|
286
|
+
}
|
276
287
|
}
|
277
|
-
} else {
|
278
|
-
fieldConfigs.checked = field.value === value
|
279
|
-
}
|
280
288
|
|
281
|
-
|
289
|
+
delete fieldConfigs.value
|
290
|
+
}
|
282
291
|
}
|
283
292
|
|
284
293
|
field.set(fieldConfigs)
|