Fix: Prevent indicators from being deleted during TF switch
- Remove window.renderIndicatorList() call from renderTA() - This was triggering initIndicatorPanel during each TF switch - Added logging to removeIndicatorById to track unexpected deletions - Removed indicator configuration UI from TA panel (sidebar handles this now)
This commit is contained in:
@ -499,7 +499,7 @@ async loadTA() {
|
||||
}
|
||||
}
|
||||
|
||||
renderTA() {
|
||||
renderTA() {
|
||||
if (!this.taData || this.taData.error) {
|
||||
document.getElementById('taContent').innerHTML = `<div class="ta-error">${this.taData?.error || 'No data available'}</div>`;
|
||||
return;
|
||||
@ -542,23 +542,7 @@ async loadTA() {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ta-section">
|
||||
<div class="ta-section-title">Indicators</div>
|
||||
<div id="indicatorList" class="indicator-list"></div>
|
||||
</div>
|
||||
|
||||
<div class="ta-section" id="indicatorConfigPanel">
|
||||
<div class="ta-section-title">Configuration</div>
|
||||
<div id="configForm" style="margin-top: 8px;"></div>
|
||||
<div style="display: flex; gap: 8px; margin-top: 12px;" id="configButtons">
|
||||
<button class="ta-btn" onclick="applyIndicatorConfig()" style="flex: 1; font-size: 11px; background: var(--tv-blue); color: white; border: none;">Apply</button>
|
||||
<button class="ta-btn" onclick="removeIndicator()" style="flex: 1; font-size: 11px; border-color: var(--tv-red); color: var(--tv-red);">Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
window.renderIndicatorList?.();
|
||||
}
|
||||
|
||||
async loadStats() {
|
||||
|
||||
Reference in New Issue
Block a user