Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { AbstractEditCellEditor } from '../abstract-cell-editor.component';
[thyAutofocus]="autoFocus()"
[(ngModel)]="modelValue"
(ngModelChange)="valueChange()"
(thyEnter)="updateValue()"
(thyEnter)="onEnter($event)"
(blur)="updateValue()"
thySize="lg"
></textarea>
Expand Down Expand Up @@ -61,6 +61,14 @@ export class TextCellEditorComponent extends AbstractEditCellEditor<string> impl
this.updateStyle();
}

onEnter(event: KeyboardEvent) {
if (event.shiftKey) {
return;
}
event.preventDefault();
this.updateValue();
}

updateValue() {
super.update();
this.closePopover();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export class AITableCellText extends CoverCellBase {
...text,
height: text.height + AI_TABLE_CELL_PADDING + AI_TABLE_CELL_LINE_BORDER
};

});

textMaxWidth = computed(() => {
Expand All @@ -165,6 +164,9 @@ export class AITableCellText extends CoverCellBase {
if (isUndefinedOrNull(textRender)) {
return;
}
if (this.isExpand()) {
return textRender.replace(/\r\n|\r/g, '\n');
}
return textRender.replace(/\r|\n/g, ' ');
});

Expand Down Expand Up @@ -217,7 +219,6 @@ export class AITableCellText extends CoverCellBase {
ellipsis: false,
zIndex
};

}
return;
});
Expand Down
Loading