@cocreate/elements 1.34.2 → 1.34.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.34.3](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.34.2...v1.34.3) (2024-02-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* getObject error ([ca732bb](https://github.com/CoCreate-app/CoCreate-elements/commit/ca732bb7824a6fc2dcdad6532f316fa9a2221915))
|
|
7
|
+
|
|
1
8
|
## [1.34.2](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.34.1...v1.34.2) (2024-02-17)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/elements",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.3",
|
|
4
4
|
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"elements",
|
package/src/index.js
CHANGED
|
@@ -442,7 +442,15 @@ async function filterData(element, data, type, key) {
|
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
async function checkFilters(element, data, type) {
|
|
445
|
-
let Data
|
|
445
|
+
let Data
|
|
446
|
+
if (!element.getData) {
|
|
447
|
+
// TODO: fix: getObject as this is related to render or form, but filter could exist on an input which does not have getObject
|
|
448
|
+
// TODO: generate an object of current element key: value to use with filter. because filter is used object is not defined
|
|
449
|
+
Data = getObject(element)
|
|
450
|
+
Data = Data[type][0]
|
|
451
|
+
} else
|
|
452
|
+
Data = await element.getData()
|
|
453
|
+
|
|
446
454
|
if (!Data) return
|
|
447
455
|
|
|
448
456
|
let newData
|