Default header renderer
(ctx HeaderContext)
| 181 | |
| 182 | // Default header renderer |
| 183 | func defaultHeaderRenderer(ctx HeaderContext) any { |
| 184 | return vdom.H("div", map[string]any{ |
| 185 | "className": "flex items-center gap-2", |
| 186 | }, |
| 187 | vdom.H("span", nil, ctx.Column), |
| 188 | vdom.If(ctx.IsSorted, |
| 189 | vdom.H("span", map[string]any{ |
| 190 | "className": "text-blue-400", |
| 191 | }, vdom.IfElse(ctx.SortDirection == "asc", "↑", "↓")), |
| 192 | ), |
| 193 | ) |
| 194 | } |
| 195 | |
| 196 | // Helper function to safely call RowClassName function |
| 197 | func makeRowClassName[T any](rowClassNameFunc func(ctx RowContext[T]) string, rowCtx RowContext[T]) string { |
no test coverage detected