FIX: tag input says tags are optional when they're required

This commit is contained in:
Neil Lalonde 2020-05-21 12:40:33 -04:00
parent 1a5bcf2a64
commit 5a71c51ddd
No known key found for this signature in database
GPG Key ID: FF871CA9037D0A91
2 changed files with 8 additions and 0 deletions

View File

@ -185,6 +185,13 @@ export default Controller.extend(bufferedProperty("model"), {
);
},
@discourseComputed("model.category")
minimumRequiredTags(category) {
return category && category.minimum_required_tags > 0
? category.minimum_required_tags
: null;
},
_forceRefreshPostStream() {
this.appEvents.trigger("post-stream:refresh", { force: true });
},

View File

@ -36,6 +36,7 @@
options=(hash
filterable=true
categoryId=buffered.category_id
minimum=minimumRequiredTags
)
}}
{{/if}}