FIX: replaces fake null value by clearable option (#8875)
This commit is contained in:
parent
2240b1681b
commit
8ca9ad887d
|
@ -87,6 +87,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-clear {
|
.btn-clear {
|
||||||
|
margin-left: 0.25em;
|
||||||
padding: 0.25em;
|
padding: 0.25em;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
|
@ -87,9 +87,9 @@ export default Controller.extend({
|
||||||
|
|
||||||
@discourseComputed("site.groups")
|
@discourseComputed("site.groups")
|
||||||
siteGroups(groups) {
|
siteGroups(groups) {
|
||||||
const values = [{ name: "", value: null }];
|
return groups.map(g => {
|
||||||
groups.forEach(g => values.push({ name: g.name, value: g.name }));
|
return { name: g.name, value: g.name };
|
||||||
return values;
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("pollType", "regularPollType")
|
@discourseComputed("pollType", "regularPollType")
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<label class="input-group-label">{{i18n 'poll.ui_builder.poll_groups.label'}}</label>
|
<label class="input-group-label">{{i18n 'poll.ui_builder.poll_groups.label'}}</label>
|
||||||
{{combo-box content=siteGroups
|
{{combo-box content=siteGroups
|
||||||
value=pollGroups
|
value=pollGroups
|
||||||
|
options=(hash clearable=true)
|
||||||
valueAttribute="value"}}
|
valueAttribute="value"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue