@cocreate/events 1.6.12 → 1.7.0
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 +12 -0
- package/demo/set-value.html +8 -2
- package/package.json +1 -1
- package/src/index.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [1.7.0](https://github.com/CoCreate-app/CoCreate-events/compare/v1.6.12...v1.7.0) (2023-04-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add cdn ([62fda1b](https://github.com/CoCreate-app/CoCreate-events/commit/62fda1b4d8e2a7cbf6d9e9734cd78287a5c1a04a))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* handling of array value from getValue ([0332e3c](https://github.com/CoCreate-app/CoCreate-events/commit/0332e3cdf6b565725df959acb203065a37456f0f))
|
|
12
|
+
|
|
1
13
|
## [1.6.12](https://github.com/CoCreate-app/CoCreate-events/compare/v1.6.11...v1.6.12) (2023-04-11)
|
|
2
14
|
|
|
3
15
|
|
package/demo/set-value.html
CHANGED
|
@@ -11,8 +11,14 @@
|
|
|
11
11
|
<span id="testing" class="{{ty}}">other content</span>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
-
<
|
|
15
|
-
|
|
14
|
+
<form realtime="false">
|
|
15
|
+
<input input-target="#testing2" input-attribute="value" value-type="array"/>
|
|
16
|
+
|
|
17
|
+
<input id="testing2" class="{{ty}}"/>
|
|
18
|
+
</form>
|
|
19
|
+
|
|
20
|
+
<!-- <script src="../../../CoCreateJS/dist/CoCreate.js"></script> -->
|
|
21
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js" ></script>
|
|
16
22
|
|
|
17
23
|
</body>
|
|
18
24
|
</html>
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -188,9 +188,12 @@ const CoCreateEvents = {
|
|
|
188
188
|
let values = element.getAttribute(`${prefix}-value`) || element.getAttribute(prefix);
|
|
189
189
|
if (values)
|
|
190
190
|
values = values.split(',');
|
|
191
|
-
else
|
|
192
|
-
values =
|
|
193
|
-
|
|
191
|
+
else {
|
|
192
|
+
values = element.getValue()
|
|
193
|
+
if (!Array.isArray(values))
|
|
194
|
+
values = [values]
|
|
195
|
+
}
|
|
196
|
+
|
|
194
197
|
if (!values || values.length == 0)
|
|
195
198
|
return;
|
|
196
199
|
|