From 078286a10ff9a68e8eea4dc725a2bcf5c24dd984 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 16 Jul 2019 16:24:08 +0200 Subject: [PATCH] Improved the metadata setter of the client vc item --- visual_console_client/src/Item.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/visual_console_client/src/Item.ts b/visual_console_client/src/Item.ts index f74c80f25c..ba10ff4b5f 100644 --- a/visual_console_client/src/Item.ts +++ b/visual_console_client/src/Item.ts @@ -601,14 +601,17 @@ abstract class VisualConsoleItem { } /** - * Clasic and protected version of the setter of the `meta` property. + * Classic version of the setter of the `meta` property. * Useful to override it from children classes. * @param newProps */ - protected setMeta(newMetadata: ItemMeta) { + public setMeta(newMetadata: Partial): void { const prevMetadata = this._metadata; // Update the internal meta. - this._metadata = newMetadata; + this._metadata = { + ...prevMetadata, + ...newMetadata + }; // From this point, things which rely on this.props can access to the changes.