arrow_back
Back to Tickets
Edit Trouble Ticket
Update the ticket information below
Date Initiated
*
Status
*
Open
Pending
Completed
Terminated
Creator
*
Priority
*
1
Urgent
Select urgency...
Urgent
Not Urgent
Important
Select importance...
Important
Not Important
Project Name
*
zfrika
Problem
*
when views contact , set to offline and show who is online right away.
Question
what is deciding if the list is visible ? what is empty-state ? const grid = document.getElementById('connections-grid');
Root Cause
Notes
Strategy
Helpful People
Helpful Links
Diagram
Previous Steps
Next Steps
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.
Solution
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.
Insight
Date Resolved
save
Update Ticket
Cancel