Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/predbat/web_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6738,7 +6738,7 @@ def get_plan_renderer_js():
html += '<div class="dropdown">';
html += `<div id="${dropdownId}" class="dropdown-content">`;
html += `<label>Override ${type} rate:</label>`;
html += `<input type="number" id="rate_${dropdownId}" value="${inputValue}" step="0.01">`;
html += `<input type="number" id="rate_${dropdownId}" value="${inputValue}" step="0.1">`;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 16f0d65. inputValue is now rounded to 1 decimal place (parseFloat((…).toFixed(1))), so it's always aligned with step="0.1" and browsers won't snap on the first arrow click.

html += `<button onclick="handleRateOverride('${timeDisplay}', '${type}', '${dropdownId}')">Set Override</button>`;
if (isOverride) {
html += `<a onclick="handleRateOverride('${timeDisplay}', '${type}', null, true)">Clear</a>`;
Expand Down
Loading