|
@@ -441,12 +441,13 @@ const SpreadJsObj = {
|
|
|
sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.unit);
|
|
|
}
|
|
|
if (colSetting.cellType === 'customizeCombo') {
|
|
|
- if (!sheet.extendCellType.unit) {
|
|
|
- sheet.extendCellType.unit = this.CellType.getCustomizeComboCellType(colSetting.comboItems);
|
|
|
+ const cellKey = colSetting.cellTypeKey ? 'customizeCombo-' + colSetting.cellTypeKey : 'customizeCombo';
|
|
|
+ if (!sheet.extendCellType[cellKey]) {
|
|
|
+ sheet.extendCellType[cellKey] = this.CellType.getCustomizeComboCellType(colSetting.comboItems);
|
|
|
if (!sheet.AcitveComboRefresh) {
|
|
|
sheet.bind(spreadNS.Events.LeaveCell, function (e, info) {
|
|
|
const cellType = info.sheet.getCell(info.row, info.col).cellType();
|
|
|
- if (cellType === sheet.extendCellType.unit) {
|
|
|
+ if (cellType === sheet.extendCellType[cellKey]) {
|
|
|
info.sheet.leaveCell = {row: info.row, col: info.col};
|
|
|
} else {
|
|
|
delete info.sheet.leaveCell;
|
|
@@ -460,7 +461,7 @@ const SpreadJsObj = {
|
|
|
sheet.AcitveComboRefresh = true;
|
|
|
}
|
|
|
}
|
|
|
- sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType.unit);
|
|
|
+ sheet.getRange(-1, col, -1, 1).cellType(sheet.extendCellType[cellKey]);
|
|
|
}
|
|
|
if (colSetting.formatter) {
|
|
|
sheet.getRange(-1, col, -1, 1).formatter(colSetting.formatter);
|