Skip to content

Commit

Permalink
fix $wire in js file
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickweh committed Jul 12, 2024
1 parent cb4d0db commit 25c7777
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resources/js/tall-datatables.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ document.addEventListener('alpine:init', () => {
this.loadTableConfig();
this.$nextTick(() => {
this.$watch('enabledCols', () => {
this.$wire.storeColLayout(this.enabledCols);
this.$wire.getFormatters()
$wire.storeColLayout(this.enabledCols);
$wire.getFormatters()
.then(
formatters => {
this.formatters = formatters;
}
);
this.$wire.getColLabels(this.enabledCols)
$wire.getColLabels(this.enabledCols)
.then(
result => {
this.colLabels = result;
Expand All @@ -26,11 +26,11 @@ document.addEventListener('alpine:init', () => {
this.loadFilterable()

this.$watch('search', () => {
this.$wire.startSearch();
$wire.startSearch();
});

this.$watch('aggregatableCols', () => {
this.$wire.applyAggregations();
$wire.applyAggregations();
});

this.$watch('newFilter.column', () => {
Expand Down Expand Up @@ -73,7 +73,7 @@ document.addEventListener('alpine:init', () => {
addedChannels.forEach(channel => {
Echo.private(channel)
.listenToAll((event, data) => {
this.$wire.eloquentEventOccurred(event, data);
$wire.eloquentEventOccurred(event, data);
});
});
});
Expand All @@ -92,7 +92,7 @@ document.addEventListener('alpine:init', () => {
});
},
loadTableConfig() {
this.$wire.getConfig().then(
$wire.getConfig().then(
result => {
this.enabledCols = result.enabledCols;
this.availableCols = result.availableCols;
Expand Down Expand Up @@ -371,7 +371,7 @@ document.addEventListener('alpine:init', () => {
this.filters[this.filterIndex].push(newFilter);
this.resetFilter();
this.filterSelectType = 'text';
this.$wire.$parent.getColLabels().then(result => {this.colLabels = result;});
$wire.getColLabels().then(result => {this.colLabels = result;});

this.$nextTick(() => this.$refs.filterColumn.focus());
},
Expand Down

0 comments on commit 25c7777

Please sign in to comment.