From 137b6fcff77d8ca845f5afbf692556e2b8ece986 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 10 Feb 2025 16:31:51 +0200 Subject: [PATCH] text field: show more after editing --- client/src/views/fields/text.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/views/fields/text.js b/client/src/views/fields/text.js index ed8075c0ed..da0ab7520e 100644 --- a/client/src/views/fields/text.js +++ b/client/src/views/fields/text.js @@ -178,6 +178,14 @@ class TextFieldView extends BaseFieldView { this.addActionHandler('previewText', () => this.preview()); } + this.listenTo(this.model, `change:${this.name}`, (m, v, /** Record*/o) => { + if (o.ui === true && this.mode === this.MODE_EDIT) { + // After changing the field content it's reasonable to show all text + // when returning to the detail mode. + this.seeMoreText = true; + } + }) + /** @private */ this.controlSeeMoreBind = this.controlSeeMore.bind(this); /** @private */