FIX: replaces fake null value by clearable option (#8875)

This commit is contained in:
Joffrey JAFFEUX
2020-02-06 08:30:26 +01:00
committed by GitHub
parent 2240b1681b
commit 8ca9ad887d
3 changed files with 5 additions and 3 deletions

View File

@@ -87,9 +87,9 @@ export default Controller.extend({
@discourseComputed("site.groups")
siteGroups(groups) {
const values = [{ name: "", value: null }];
groups.forEach(g => values.push({ name: g.name, value: g.name }));
return values;
return groups.map(g => {
return { name: g.name, value: g.name };
});
},
@discourseComputed("pollType", "regularPollType")

View File

@@ -26,6 +26,7 @@
<label class="input-group-label">{{i18n 'poll.ui_builder.poll_groups.label'}}</label>
{{combo-box content=siteGroups
value=pollGroups
options=(hash clearable=true)
valueAttribute="value"}}
</div>