()
| 17110 | } |
| 17111 | |
| 17112 | // Create label container |
| 17113 | const labelSpan = document.createElement('span'); |
| 17114 | labelSpan.textContent = label; |
| 17115 | header.appendChild(labelSpan); |
| 17116 | |
| 17117 | // Create sort indicator container |
| 17118 | const sortIndicator = document.createElement('span'); |
| 17119 | sortIndicator.className = 'sort-indicator'; |
| 17120 | sortIndicator.style.display = 'inline-flex'; |
| 17121 | sortIndicator.style.alignItems = 'center'; |
| 17122 | sortIndicator.style.marginLeft = '4px'; |
| 17123 | sortIndicator.style.opacity = '0'; |
| 17124 | sortIndicator.style.transition = 'opacity 0.2s ease'; |
| 17125 | header.appendChild(sortIndicator); |
| 17126 | |
| 17127 | // Add click handler |
| 17128 | header.addEventListener('click', async () => { |
| 17129 | const sortSelect = document.getElementById('sort-select'); |
| 17130 | if (!sortSelect) return; |
| 17131 | |
| 17132 | const currentSort = sortSelect.value; |
| 17133 | let newSort; |
| 17134 | |
| 17135 | // Determine new sort based on current state |
no test coverage detected