作成日: 2017/03/02 最終更新日: 2017/03/16
文書種別
不具合
状況
修正済み
詳細
beginningEditイベントでDataMapを動的に変更した場合、ドロップダウンリストを表示しようとすると、一瞬表示され、すぐに閉じてしまいます。
本現象は、5.20162.231以前のバージョンでは発生しません。
本現象は、5.20162.231以前のバージョンでは発生しません。
回避方法
この問題はバージョン5.20163.281で修正されました。
修正版の適用方法については、アップデートの方法を参照してください。
修正版を適用しない場合の回避方法は次の通りです。
下記コードのようにbeginningEditイベントでDataMapを動的に変更するのではなく、getDisplayValuesメソッドを使用して変更します。
◆サンプルコード(javascript)
----------------------------------
var cities1 = [
{ country: 'US', city: 'Washington' },
{ country: 'US', city: 'Miami' },
{ country: 'US', city: 'Seattle' },
{ country: 'UK', city: 'London' },
{ country: 'UK', city: 'Oxford' },
{ country: 'UK', city: 'Bath' },
{ country: 'Japan', city: 'Tokyio' },
{ country: 'Japan', city: 'Sendai' },
{ country: 'Japan', city: 'Kobe' },
{ country: 'Greece', city: 'Athens' },
{ country: 'Greece', city: 'Santorini' },
{ country: 'Greece', city: 'Thebes' },
{ country: 'Germany', city: 'Bonn' },
{ country: 'Germany', city: 'Munich' },
{ country: 'Germany', city: 'Kiel' },
{ country: 'Italy', city: 'Rome' },
{ country: 'Italy', city: 'Florence' },
{ country: 'Italy', city: 'Milan' },
];
grid.columns[1].dataMap = new wijmo.grid.DataMap(cities1, 'city', 'city');
grid.columns[1].dataMap.getDisplayValues = function (dataItem) {
var arr = [];
for (var i = 0; i < cities1.length; i++) {
if (cities1[i].country == grid.getCellData(grid.selection.row, 1)) {
arr.push(cities1[i].city);
}
}
return arr;
}
----------------------------------
修正版の適用方法については、アップデートの方法を参照してください。
修正版を適用しない場合の回避方法は次の通りです。
下記コードのようにbeginningEditイベントでDataMapを動的に変更するのではなく、getDisplayValuesメソッドを使用して変更します。
◆サンプルコード(javascript)
----------------------------------
var cities1 = [
{ country: 'US', city: 'Washington' },
{ country: 'US', city: 'Miami' },
{ country: 'US', city: 'Seattle' },
{ country: 'UK', city: 'London' },
{ country: 'UK', city: 'Oxford' },
{ country: 'UK', city: 'Bath' },
{ country: 'Japan', city: 'Tokyio' },
{ country: 'Japan', city: 'Sendai' },
{ country: 'Japan', city: 'Kobe' },
{ country: 'Greece', city: 'Athens' },
{ country: 'Greece', city: 'Santorini' },
{ country: 'Greece', city: 'Thebes' },
{ country: 'Germany', city: 'Bonn' },
{ country: 'Germany', city: 'Munich' },
{ country: 'Germany', city: 'Kiel' },
{ country: 'Italy', city: 'Rome' },
{ country: 'Italy', city: 'Florence' },
{ country: 'Italy', city: 'Milan' },
];
grid.columns[1].dataMap = new wijmo.grid.DataMap(cities1, 'city', 'city');
grid.columns[1].dataMap.getDisplayValues = function (dataItem) {
var arr = [];
for (var i = 0; i < cities1.length; i++) {
if (cities1[i].country == grid.getCellData(grid.selection.row, 1)) {
arr.push(cities1[i].city);
}
}
return arr;
}
----------------------------------
旧文書番号
82027