Skip to content

Commit 8949c8f

Browse files
authored
Merge pull request #4524 from crazyserver/MOBILE-4842
MOBILE-4842 myoverview: Fix combobox selection output model
2 parents 6110900 + 2b42489 commit 8949c8f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/addons/block/myoverview/components/myoverview/addon-block-myoverview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h2>{{ 'addon.block_myoverview.pluginname' | translate }}</h2>
3737
<ion-row class="ion-justify-content-between ion-align-items-center addon-block-myoverview-filter">
3838
@if (filters.enabled) {
3939
<ion-col size="auto">
40-
<core-combobox [label]="'core.courses.filtermycourses' | translate" [selection]="filters.timeFilterSelected"
40+
<core-combobox [label]="'core.courses.filtermycourses' | translate" [(selection)]="filters.timeFilterSelected"
4141
(selectionChange)="filterCourses()">
4242
@if (filters.show.allincludinghidden) {
4343
<ion-select-option class="ion-text-wrap core-select-option-border-bottom" value="allincludinghidden">
@@ -95,7 +95,7 @@ <h2>{{ 'addon.block_myoverview.pluginname' | translate }}</h2>
9595
</ion-col>
9696
@if (sort.enabled) {
9797
<ion-col size="auto">
98-
<core-combobox [label]="'core.sortby' | translate" [selection]="sort.selected" (selectionChange)="sortCourses()"
98+
<core-combobox [label]="'core.sortby' | translate" [(selection)]="sort.selected" (selectionChange)="sortCourses()"
9999
icon="fas-arrow-down-short-wide" class="no-border">
100100
<ion-select-option class="ion-text-wrap" value="fullname">
101101
{{'addon.block_myoverview.title' | translate}}

src/core/components/combobox/combobox.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,14 @@ export class CoreComboboxComponent implements ControlValueAccessor {
135135

136136
this.expanded.set(true);
137137

138-
const data = await CoreModals.openModal({
138+
const data = await CoreModals.openModal<string>({
139139
...modalOptions,
140140
id: this.listboxId() || modalOptions.id,
141141
});
142142
this.expanded.set(false);
143143

144144
if (data) {
145+
this.selection.set(data);
145146
this.onValueChanged(data);
146147
}
147148
}

0 commit comments

Comments
 (0)