@cocreate/events 1.19.3 → 1.19.4
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.19.4](https://github.com/CoCreate-app/CoCreate-events/compare/v1.19.3...v1.19.4) (2024-03-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ifValue defaults to value or <prefix>-if-value ([74a35c5](https://github.com/CoCreate-app/CoCreate-events/commit/74a35c5b17644caa52c40ce2ca931cbafe161a28))
|
|
7
|
+
|
|
1
8
|
## [1.19.3](https://github.com/CoCreate-app/CoCreate-events/compare/v1.19.2...v1.19.3) (2024-02-20)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -263,11 +263,16 @@ const CoCreateEvents = {
|
|
|
263
263
|
let elseCondition = element.getAttribute(`${prefix}-else`);
|
|
264
264
|
|
|
265
265
|
let ifValue = element.getAttribute(`${prefix}-if-value`)
|
|
266
|
-
if (ifValue
|
|
266
|
+
if (!ifValue && ifValue !== "")
|
|
267
|
+
ifValue = await element.getValue()
|
|
268
|
+
else if (ifValue || ifValue === "")
|
|
267
269
|
ifValue = [ifValue]
|
|
268
270
|
else
|
|
269
271
|
ifValue = values
|
|
270
272
|
|
|
273
|
+
if (!Array.isArray(ifValue))
|
|
274
|
+
ifValue = [ifValue]
|
|
275
|
+
|
|
271
276
|
//TODO: improved resize toggling of values
|
|
272
277
|
// let hasCondition = this.elements2.get(element)
|
|
273
278
|
if (ifCondition && evaluateCondition(ifCondition, ifValue)) {
|