when views contact , set to offline and show who is online right away.
1
zfrika
what is deciding if the list is visible ? what is empty-state ? const grid = document.getElementById('connections-grid');
const grid = document.getElementById('connections-grid'); connections-grid has all the images. grid is the constant assigned to it. emptyState. decides if it's' visible.
step 1: default offline to checked. <input class="status-filter form-checkbox rounded text-primary focus:ring-primary/50 border-gray-300 dark:border-gray-600 dark:bg-gray-700" type="checkbox" value="offline" checked /> <span class="text-sm font-medium text-gray-700 dark:text-gray-300">Offline</span> step 2: init() { this.loadConnections(); this.setupEventListeners(); // Add these two lines here: this.updateFilterStatus(); this.updateFilterCategory(); this.renderConnections(); this.updateConnectionCount(); } 2. Why this works By calling this.updateFilterStatus() inside init(): It runs document.querySelectorAll('.status-filter:checked'). It finds your HTML inputs that have the checked attribute. It fills this.activeFilters.status with ['online', 'offline'] (or whatever is checked). It then runs filterConnections(), which correctly identifies that those users should be shown.