Skip to content

Commit 1ea870d

Browse files
authored
Update predbat-table-card.js
Ensure `options-popup-column` has a visual reference when the override is not allowed
1 parent c89c98a commit 1ea870d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

predbat-table-card.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,13 +1345,15 @@ class PredbatTableCard extends HTMLElement {
13451345
if(column === "options-popup-column") {
13461346

13471347
const iconSize = 24;
1348+
const iconOpacity = isAllowed ? '0.8' : '0.25';
1349+
const iconPointer = isAllowed ? 'pointer' : 'not-allowed';
13481350

13491351
// CREATE THE ICON
13501352
const iconEl = document.createElement('ha-icon');
13511353
iconEl.setAttribute('title', "Battery Overrides");
13521354
iconEl.setAttribute('icon', "mdi:application-edit-outline");
1353-
iconEl.style.cursor = 'pointer';
1354-
iconEl.style.opacity = 0.8;
1355+
iconEl.style.cursor = iconPointer;
1356+
iconEl.style.opacity = iconOpacity;
13551357
iconEl.style.fill = "var(--text-primary-color)";
13561358
iconEl.style.setProperty('--mdc-icon-size', iconSize + 'px');
13571359

0 commit comments

Comments
 (0)