EditCell ​

EditCell is an inline editable cell component used by editable table scenarios. It supports multiple editor types, validation, tooltip display, popover editing, and batch-paste integration.

Basic Usage ​

Basic editable cell with the default input editor.

Click to edit

Value: Click to edit

Showtips ​

Set showtips to show the full value in a tooltip when the display text is truncated.

This is a long text value. Hover to preview the full content, then click to edit it.

Different Editors ​

Use element to switch between supported editor types such as el-input, el-input-number, and el-select.

Hello10a

Popover Edit ​

Set popoverEdit to edit the value inside a popover textarea.

Edit me

Behavior Notes ​

  • When always-edit is false, the cell enters edit mode after click.
  • When element is set to text, the component renders display text only.
  • When need-batch-copy is true, paste is intercepted and emitted through the paste event.
  • When EditCell is rendered inside BaseTable, it automatically participates in validateCells() and clearCellValidate().

API ​

EditCell Attributes ​

NameDescriptionTypeDefault
value / v-model:valuecell valuestring / number / array''
propvalidation field pathstring / array—
rulesvalidation rules passed to async-validatorarray / object—
requiredexplicitly control the required state used by validationbooleanfalse
item-propsextra props forwarded to the inner editor componentobject{}
elementeditor typestring'el-input'
always-editalways show the editor instead of click-to-edit modebooleanfalse
disableddisable editingbooleanfalse
clearablewhether the editor can be clearedbooleantrue
filterableenable filtering for select-like editorsbooleanfalse
placeholderplaceholder textstring''
maxlengthmax input lengthstring / number256
sizecomponent sizestring'default'
minminimum value for number editorsnumber0
maxmaximum value for number editorsnumber9999
stepstep for number editorsnumber1
precisionprecision for number editorsnumber0
readonlyread-only modebooleanfalse
showtipsshow tooltip for display textbooleanfalse
popover-editedit the value in a popover textareabooleanfalse
popover-propsextra props forwarded to the popover textareaobject{}
rowcurrent row data contextobject{}
need-batch-copyenable batch paste handlingbooleanfalse

Validation priority: when required is explicitly passed to EditCell, it overrides rules.required. If required is not passed, the component uses the required value defined in rules.

Validation Behavior ​

  • Validation is handled by async-validator.
  • Rules are filtered by trigger. If a rule has no trigger, it participates in any validation call.
  • String values are trimmed before change and blur validation completes.

EditCell Events ​

NameDescriptionType
update:valuetriggered when the value changesFunction
changetriggered after value change handling completesFunction
focustriggered when the editor gains focusFunction
blurtriggered when editing endsFunction
pastetriggered on paste when need-batch-copy is enabledFunction

Exposes ​

NameDescriptionType
validatevalidate the current cell with the given triggerFunction
clearValidateclear the current validation stateFunction
validateStatecurrent validation statestring
validateMessagecurrent validation messagestring

Source ​

Docs