Show correct data type in data table cell editor (#2440)

* Show correct data type in data table cell editor

* Ensure date cell type is shown in cell editor
This commit is contained in:
Joanne Ong 2020-04-24 15:28:24 +08:00 committed by GitHub
parent 55ea09d21c
commit b6f6904af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -543,7 +543,11 @@ DataTableCellUI.prototype._startEdit = function(elmt) {
elmts.or_views_ctrlEnter.html($.i18n('core-views/ctrl-enter')); elmts.or_views_ctrlEnter.html($.i18n('core-views/ctrl-enter'));
elmts.cancelButton.html($.i18n('core-buttons/cancel')); elmts.cancelButton.html($.i18n('core-buttons/cancel'));
elmts.or_views_esc.html($.i18n('core-buttons/esc')); elmts.or_views_esc.html($.i18n('core-buttons/esc'));
var cellDataType = typeof originalContent === "string" ? "text" : typeof originalContent;
cellDataType = ("t" in this._cell && this._cell.t != null) ? this._cell.t : cellDataType;
elmts.typeSelect.val(cellDataType);
MenuSystem.showMenu(menu, function(){}); MenuSystem.showMenu(menu, function(){});
MenuSystem.positionMenuLeftRight(menu, $(this._td)); MenuSystem.positionMenuLeftRight(menu, $(this._td));