From 2a2303d1dccc120dd7aa5f6b6ade0f89e0064850 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 25 Nov 2025 07:42:23 +0000
Subject: [PATCH] =Feed block mostly good! Referrals look good to go. Ready for Madi and Heidi to approve

---
 assets/js/dash/CRUD.js |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/assets/js/dash/CRUD.js b/assets/js/dash/CRUD.js
index 6780203..0a2144b 100644
--- a/assets/js/dash/CRUD.js
+++ b/assets/js/dash/CRUD.js
@@ -18,9 +18,10 @@
 		this.updateBulkOptions();
 
 		// Initialize components
-		this.store = window.jvbStore.register(
+		const store = window.jvbStore.register(
 			this.content,
 			{
+				storeName: this.content,
 				keyPath: 'id',
 				endpoint: 'content',
 				headers: {
@@ -42,7 +43,9 @@
 					order: 'desc'
 				},
 				TTL: 30 * 60 * 1000,	//30 minutes cache
+				showLoading: true,
 			});
+		this.store = store[this.content];
 
 		this.status = 'all';
 		this.filterTimeout = null;
@@ -411,6 +414,9 @@
 					break;
 			}
 		}
+		if (window.targetCheck(e, 'select[data-filter]')) {
+			this.handleFilterChange(e);
+		}
 	}
 	handleTableChange(e) {
 		const row = e.target.closest('tr[data-id]');
@@ -562,7 +568,7 @@
 		let filter = target.dataset.filter;
 		if (filter === 'taxonomies') {
 			let taxonomy = target.dataset.taxonomy;
-			this.store.setFilter(`tax_${taxonomy}`, filter.value);
+			this.store.setFilter(`tax_${taxonomy}`, target.value);
 		} else {
 			this[target.dataset.filter] = target.value;
 			this.store.setFilter(target.dataset.filter, target.value);
@@ -654,18 +660,6 @@
 	}
 
 	setupFilters() {
-		document.querySelectorAll('[data-filter]').forEach(filter => {
-			this.settings.addSetting(filter)
-			filter.addEventListener('change', (e) => {
-				if (this.filterTimeout) {
-					clearTimeout(this.filterTimeout);
-				}
-				this.filterTimeout = setTimeout(() => {
-					this.filterHandler(e);
-				}, 300);
-			});
-		});
-
 		// Search
 		const searchInput = document.querySelector('input[type="search"]');
 		if (searchInput) {

--
Gitblit v1.10.0