Skip to content

Commit cd8d0fe

Browse files
committed
Allow LokiLoader components to be registered in LokiComponents store too
1 parent 22a56bd commit cd8d0fe

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<?php
22
declare(strict_types=1);
33

4-
/** @version 2.2.38 */
5-
64
use Magento\Framework\View\Element\Template;
75

6+
/** @version 2.2.38 */
87
/** @var Template $block */
98
?>
109
<script>
1110
document.addEventListener('alpine:init', () => {
1211
Alpine.data('LokiLoader', () => ({
1312
...LokiLoaderComponentPartial,
13+
init() {
14+
this.id = this.$root.getAttribute('x-title');
15+
Alpine.store('LokiComponents').add(this);
16+
}
1417
}));
1518
});
1619
</script>

0 commit comments

Comments
 (0)