0
タイトル: 選択肢ツリーmultiselect patosaiの削除または無効化に関する問題があります。実際には無効または削除は機能していますが、ディスプレイは再レンダリングされません。 ここjsfiddlepatoshai tree multiselectを削除または無効にする方法
<input id="checkedTree" type="text"/>
<select id="test-select">
<option value="1" data-section="fruit">Banana</option>
<option value="2" data-section="fruit">Apple</option>
<option value="3" data-section="fruit">Avocado</option>
<option value="4" data-section="fruit">Pineapple</option>
<option value="5" data-section="fruit">PenPineappleApplePen</option>
<option value="6" data-section="animal">Tiger</option>
<option value="7" data-section="animal">Lion</option>
<option value="8" data-section="animal">Pitbull</option>
<option value="9" data-section="animal">OrangUtan</option>
<option value="10" data-section="animal">Marsupilami Yellow cartoon</option>
</select>
<button id="dis" onclick = "disableSelect()">
Remove apple and avocado
</button>
$(document).ready(function() {
var $select = $('#test-select');
$select.treeMultiselect({
enableSelectAll: true,
sortable: false,
searchable: true,
startCollapse: true,
onChange:function(){
if ($select.val() != null){
document.getElementById("checkedTree").value = $select.val();
}else{
document.getElementById("checkedTree").value = "";
}
}
});
});
function disableSelect(){
document.getElementById("test-select").remove(2);
document.getElementById("test-select").remove(2);
//document.getElementById("checkedTree").value = "success";
}
証拠その作業、私がチェックしたときに、それらのリンゴとアボカドがnullの取得値...
はところで、2は同じでpatosaiツリーの複数選択を使用して選択させるためにどのような方法がありますページ?どうやって?
ありがとうございます。あなたのコード作業に感謝します。しかし、私がすべてを選んだとしても、すべての値(1〜10)が得られるはずです(1,3-10)。再レンダリングする方法はありますか? –