mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Null or undefined value on the Integer / Numeric cell
Summary: Text editor for Integer and Numeric column was showing null or undefined when the underlying value was null. Test Plan: Browser test Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2817
This commit is contained in:
@@ -33,7 +33,7 @@ export class NTextEditor extends NewBaseEditor {
|
||||
this._contentSizer = dom('div.celleditor_content_measure'),
|
||||
this.textInput = dom('textarea', dom.cls('celleditor_text_editor'),
|
||||
dom.style('text-align', this._alignment),
|
||||
dom.prop('value', undefDefault(options.editValue, String(options.cellValue))),
|
||||
dom.prop('value', undefDefault(options.editValue, String(options.cellValue ?? ""))),
|
||||
this.commandGroup.attach(),
|
||||
// Resize the textbox whenever user types in it.
|
||||
dom.on('input', () => this.resizeInput())
|
||||
|
||||
@@ -39,7 +39,7 @@ function TextEditor(options) {
|
||||
this.textInput = dom('textarea.celleditor_text_editor',
|
||||
kd.attr('placeholder', options.placeholder || ''),
|
||||
kd.style('text-align', this._alignment),
|
||||
kd.value(gutil.undefDefault(options.editValue, String(options.cellValue))),
|
||||
kd.value(gutil.undefDefault(options.editValue, String(options.cellValue == null ? "" : options.cellValue))),
|
||||
this.commandGroup.attach(),
|
||||
|
||||
// Resize the textbox whenever user types in it.
|
||||
|
||||
Reference in New Issue
Block a user