Не отображать / блокировать свойства контроллеров изменять выпадающие атрибуты в spotfire 10 - PullRequest
0 голосов
/ 06 июля 2019

Я пытаюсь показать / скрыть выпадающие контроллеры свойств с помощью тега select и функции js в spotfire x.Я хочу избежать обновления области html, делая это.

Мой код работает нормально, пока пользователь не выберет что-либо из выпадающих списков пламени, после чего пользователь правильно визуализирует только тот элемент, на который он нажал.С тех пор другие выпадающие списки выглядят «обрезанными» до тех пор, пока страница не обновится

<select id="sel" onchange="showHide()">

  <option value="a">OPTION A</option>
  <option value="b">OPTION B</option>  
  <option value="c">OPTION C</option>
  <option value="d">OPTION D</option>

</select>  

<div id ="a" ><SpotfireControl id="5af7007d031347cda31bdb8b39b6e2c3" /></div>
<div id ="b"><SpotfireControl id="c6eba33a728446bf9f5471106c2568a0" /></div>
<div id ="c"><SpotfireControl id="12e315564e34449ca25af10df0057473" /></div>
<div id ="d"><SpotfireControl id="1d306b80bed1492f8d4b11a7abda82e8" /></div>


<script>

function showHide() {
var x = document.getElementById("sel").value;
if (x == 'a'){

    document.getElementById("a").style.display = "block";
    document.getElementById("b").style.display = "none";
    document.getElementById("c").style.display = "none";
    document.getElementById("d").style.display = "none";
    } else if (x =='b') {
    document.getElementById("b").style.display = "block";
    document.getElementById("a").style.display = "none";
    document.getElementById("c").style.display = "none";
    document.getElementById("d").style.display = "none";

    }else if (x =='c') {
    document.getElementById("c").style.display = "block";
    document.getElementById("a").style.display = "none";
    document.getElementById("b").style.display = "none";
    document.getElementById("d").style.display = "none";

    }else if (x =='d') {
    document.getElementById("d").style.display = "block";
    document.getElementById("a").style.display = "none";
    document.getElementById("b").style.display = "none";
    document.getElementById("c").style.display = "none";

    }
}
</script>

Глядя на поведение HTML-кода из инструментов разработчика, я заметил, что при возникновении ошибки div из ArrowContainer вырезанных выпадающих списков изменяет свою высоту иатрибуты ширины до 0px.

...