From 6950220cedd8d618481b13e6bc80da8bb280c0a3 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Thu, 3 Aug 2017 12:11:17 -0400 Subject: [PATCH] Update the tags before rendering --- modules/ui/field.js | 1 - modules/ui/preset_editor.js | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui/field.js b/modules/ui/field.js index 74364fb83..f8c7cdc48 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -144,7 +144,6 @@ export function uiField(context, presetField, entity, show) { field.tags = function(_) { if (!arguments.length) return tags; tags = _; - // field.impl.tags(tags); return field; }; diff --git a/modules/ui/preset_editor.js b/modules/ui/preset_editor.js index 3ad1ce88d..25d6e6915 100644 --- a/modules/ui/preset_editor.js +++ b/modules/ui/preset_editor.js @@ -61,20 +61,23 @@ export function uiPresetEditor(context) { presets.universal().forEach(function(field) { if (preset.fields.indexOf(field) === -1) { fieldsArr.push( - uiField(context, field, entity) + uiField(context, field, entity, false) ); } }); fieldsArr.forEach(function(field) { field - .tags(tags) .on('change', function(t, onInput) { dispatch.call('change', field, t, onInput); }); }); } + fieldsArr.forEach(function(field) { + field.tags(tags); + }); + var shown = fieldsArr.filter(function(field) { return field.isShown(); }), notShown = fieldsArr.filter(function(field) { return !field.isShown(); }); @@ -115,8 +118,6 @@ export function uiPresetEditor(context) { context.enter(modeBrowse(context)); } }); - - // d.tags(tags); });