RealGrid2 API
Interface
EditMaskObject

EditMaskObject

Object type display format in the editor that can be applied to text or date fields.

Signature:

export interface EditMaskObject

Remarks

When applying ValueColumn.editor, it is used in the editor's mask property.

For numeric fields, use NumberCellEditor.editFormat.

The format applied to Marks is displayed only in the editor.

dropDown, multiLine, multiCheck, does not work in number Editor.

Example

column.editor = {
      type: 'line',
      mask: {
          editMask: '9999-99-99',
          placeHolder: 'input...'
      }
}

Properties

PropertyTypeDescription
allowEmptybooleanWhether to allow empty values '' when mask is set to 0
definitionsanyDefined mask format
editMaskstringFormat displayed as "0000-00-00", etc.
includedFormatbooleanWhether the content displayed in the editor is passed as the cell value as is
invalidFormatMessagestringMessage to display when incorrect format is entered
overWritebooleanWhether to overwrite existing characters when inputting
placeHolderstringeditor's placeHolder
restrictNullbooleanWhether to stop input in the middle
showInvalidFormatMessagebooleanWhether or not a message is displayed when an incorrect format is entered

Properties Desc

allowEmpty

Whether empty values '' are allowed when mask is set to 0

Type - boolean


definitions

Defined mask format

Type - any

Remarks:

Used when the developer wants to define additionally or modify it in addition to the default "9", "0", "a", and "*".

Example:

definitions: {"h": "[a-h]"} //"h" can be entered from a to h.

editMask

Format displayed as "0000-00-00" etc.

Type - string

Remarks:

The format provided by default is the following regular expression.

9: new RegExp([0-9 ])

0: new RegExp([0-9])

a: new RegExp([A-Za-z])

*: new RegExp([A-Za-z0-9])


includedFormat

Whether the content displayed in the editor is passed as the cell value as is.

Type - boolean


invalidFormatMessage

Message to display when incorrect format is entered

Type - string


overWrite

Whether to overwrite existing characters when inputting

Type - boolean


placeHolder

editor's placeHolder

Type - string


restrictNull

Whether to stop inputting in the middle

Type - boolean


showInvalidFormatMessage

Is there a message displayed when an incorrect format is entered?

Type - boolean