作成日: 2023/06/09 最終更新日: 2023/10/04
文書種別
不具合
発生環境
5.20231.888以降のバージョンで発生
状況
修正済み
詳細
isEditableプロパティがtrueに設定されている場合、最初の文字列に一致するアイテムがselectedValueプロパティおよびselectedIndexプロパティに設定されます。
回避方法
この問題はバージョン5.20231.904で修正されました。
修正版を適用しない場合の回避方法は次の通りです。
selectedIndexChangedイベントで次の処理を実行します。
selectedIndexChanged: (sender) => {
// 回避方法
updateSelectedValue(sender);
},
function updateSelectedValue(comboBox) {
comboBox.selectedIndex = comboBox.collectionView.sourceCollection.findIndex(
(i) => i[comboBox.displayMemberPath] == comboBox.text
);
}