From ccf452acf6f2d97b8f72bc9e8efca3ea8e2f2b4d Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 20 Sep 2017 10:35:25 -0400 Subject: [PATCH] Replace tag documentation when tag has changed (closes #4209) --- modules/ui/tag_reference.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ui/tag_reference.js b/modules/ui/tag_reference.js index b5e5e5ec87..35a96376c9 100644 --- a/modules/ui/tag_reference.js +++ b/modules/ui/tag_reference.js @@ -170,8 +170,14 @@ export function uiTagReference(tag) { tagReference.body = function(selection) { + + var tagid = tag.rtype || (tag.key + '-' + tag.value); + body = selection.selectAll('.tag-reference-body') - .data([0]); + .data([tagid], function(d) { return d; }); + + body.exit() + .remove(); body = body.enter() .append('div')