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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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")

View File

@ -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>