Skip to content

EspoCRM – Open Source CRM Application

see more after stream post

Yuri Kuznetsov515e388521c1
diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js
index f9b79dae7d..c25248a38e 100644
--- a/client/src/views/stream/panel.js
+++ b/client/src/views/stream/panel.js
@@ -30,6 +30,7 @@ import RelationshipPanelView from 'views/record/panels/relationship';
import _ from 'underscore';
import NotePostFieldView from 'views/note/fields/post';
import ViewRecordHelper from 'view-record-helper';
+import TextFieldView from 'views/fields/text';
class PanelStreamView extends RelationshipPanelView {
@@ -720,7 +721,7 @@ class PanelStreamView extends RelationshipPanelView {
Espo.Ui.success(this.translate('Posted'));
this.collection.fetchNew()
- .then(() => {});
+ .then(() => this.afterPostAndFetch(model));
textAreaElement.disabled = false;
@@ -736,6 +737,28 @@ class PanelStreamView extends RelationshipPanelView {
this.getSessionStorage().clear(this.storageIsInernalKey);
}
+ /**
+ * @private
+ * @param {import('model').default} model
+ */
+ afterPostAndFetch(model) {
+ const rowView = this.getListView().getView(model.id);
+
+ if (!rowView) {
+ return;
+ }
+
+ const postView = rowView.getView('post');
+
+ if (!(postView instanceof TextFieldView)) {
+ console.error('Post field not obtained.')
+
+ return;
+ }
+
+ postView.seeMore();
+ }
+
/**
* @protected
* @param {import('model').default} model