mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user