Skip to content

Commit 2c50e39

Browse files
committed
feat: Initial Release
1 parent b15ff86 commit 2c50e39

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

demo/CoCreate-conditional-logic.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ <h6 style='color:blue'>7 example SELECT (show multiples)</h6>
158158
</script>
159159

160160
<!-- CoCreateJS -->
161-
<!--<script src="https://server.cocreate.app/js/CoCreate.min.js"></script>-->
161+
<!--<script src="https://server.cocreate.app/CoCreateJS/dist/CoCreate.js"></script>-->
162162

163163
<!-- CoCreateUI -->
164164

src/index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Released under the MIT license
55
* https://github.com/CoCreate-app/Conditional_Logic/blob/master/LICENSE
66
*/
7+
import observer from '@cocreate/observer'
78

89
initShowHideEles();
910

@@ -23,10 +24,10 @@ function initShowHideEles(container) {
2324
elements = [mainContainer];
2425
}
2526
for (let el of elements) {
26-
if (CoCreate.observer.getInitialized(el, "conditional-logic")) {
27+
if (observer.getInitialized(el, "conditional-logic")) {
2728
return;
2829
}
29-
CoCreate.observer.setInitialized(el, "conditional-logic")
30+
observer.setInitialized(el, "conditional-logic")
3031

3132
if(el.tagName.toLowerCase() == "option")
3233
el = el.closest('select');
@@ -40,7 +41,7 @@ function initShowHideEles(container) {
4041
}
4142
// CoCreateInit.register('CoCreateConditionalLogic', window, window.initShowHideEles);
4243

43-
CoCreate.observer.init({
44+
observer.init({
4445
name: 'CoCreateConditionalLogic',
4546
observe: ['subtree', 'childList'],
4647
include: '[data-show],[data-hide]',

0 commit comments

Comments
 (0)