fix: use classList for cleaner selection styling

- Changed from template string to classList binding for selection state
- Removed function call in isSelected to prevent reactivity issues
- Should eliminate gray border artifacts on unselected nodes
This commit is contained in:
Pulse Monitor
2025-08-29 14:10:09 +00:00
parent 29712ce388
commit 48b86fd30f
@@ -169,15 +169,14 @@ export const NodeSummaryTable: Component<NodeSummaryTableProps> = (props) => {
};
const nodeId = isPVE ? node!.name : pbs!.name;
const isSelected = () => props.selectedNode === nodeId;
const isSelected = props.selectedNode === nodeId;
return (
<tr
class={`hover:bg-gray-50 dark:hover:bg-gray-700/30 cursor-pointer transition-colors ${
isSelected()
? 'bg-blue-50 dark:bg-blue-900/20 border-l-4 border-l-blue-500 dark:border-l-blue-500'
: 'border-l-4 border-l-transparent'
}`}
class={`hover:bg-gray-50 dark:hover:bg-gray-700/30 cursor-pointer transition-colors`}
classList={{
'bg-blue-50 dark:bg-blue-900/20 border-l-4 border-l-blue-500': isSelected
}}
onClick={() => props.onNodeClick(nodeId, item.type)}
>
<td class="px-2 py-0.5 whitespace-nowrap">