diff --git a/resources/js/alpine/components/dismissible.js b/resources/js/alpine/components/dismissible.js index 821acd0ae..ad6bdf887 100644 --- a/resources/js/alpine/components/dismissible.js +++ b/resources/js/alpine/components/dismissible.js @@ -86,8 +86,10 @@ Alpine.data('categoryDeleteModal', () => ({ Alpine.data('periodFilter', (initialShowCustom) => ({ showCustom: initialShowCustom || false, - onPeriodChange(e) { - if (e.target.value === 'custom') { + onPeriodChange() { + var select = this.$refs.periodForm ? this.$refs.periodForm.querySelector('select[name="period"]') : null; + if (!select) return; + if (select.value === 'custom') { this.showCustom = true; } else { this.showCustom = false; diff --git a/resources/views/admin/categories/index.blade.php b/resources/views/admin/categories/index.blade.php index 22c0b23ba..cbf2a4ac3 100644 --- a/resources/views/admin/categories/index.blade.php +++ b/resources/views/admin/categories/index.blade.php @@ -165,7 +165,7 @@
{{ session('error') }}
-