FIX: replaces fake null value by clearable option (#8875)
This commit is contained in:
parent
2240b1681b
commit
8ca9ad887d
|
@ -87,6 +87,7 @@
|
|||
}
|
||||
|
||||
.btn-clear {
|
||||
margin-left: 0.25em;
|
||||
padding: 0.25em;
|
||||
border: 0;
|
||||
background: none;
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue