Skip to content

Commit 545dedc

Browse files
committed
Port clear status after select
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 7269766 commit 545dedc

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

apps/user_status/src/components/ClearAtSelect.vue

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,27 @@
2424
<label class="clear-at-select__label" for="clearStatus">
2525
{{ $t('user_status', 'Clear status after') }}
2626
</label>
27-
<NcMultiselect id="clearStatus"
28-
label="label"
29-
:value="option"
27+
<NcSelect id="clearStatus"
28+
class="clear-at-select__select"
3029
:options="options"
31-
open-direction="top"
32-
@select="select" />
30+
:value="option"
31+
:clearable="false"
32+
placement="top"
33+
@option:selected="select" />
3334
</div>
3435
</template>
3536

3637
<script>
37-
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect'
38-
import { getAllClearAtOptions } from '../services/clearAtOptionsService'
39-
import { clearAtFilter } from '../filters/clearAtFilter'
38+
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
39+
import { getAllClearAtOptions } from '../services/clearAtOptionsService.js'
40+
import { clearAtFilter } from '../filters/clearAtFilter.js'
41+
42+
// FIXME Initial dropdown width is not equal to input width
4043
4144
export default {
4245
name: 'ClearAtSelect',
4346
components: {
44-
NcMultiselect,
47+
NcSelect,
4548
},
4649
props: {
4750
clearAt: {
@@ -71,7 +74,7 @@ export default {
7174
/**
7275
* Triggered when the user selects a new option.
7376
*
74-
* @param {object=} option The new selected option
77+
* @param {object} option The new selected option
7578
*/
7679
select(option) {
7780
if (!option) {
@@ -94,9 +97,14 @@ export default {
9497
margin-right: 10px;
9598
}
9699
97-
.multiselect {
100+
&__select {
98101
flex-grow: 1;
99-
min-width: 130px;
100102
}
101103
}
102104
</style>
105+
106+
<style lang="scss">
107+
.vs__dropdown-menu {
108+
z-index: 9999;
109+
}
110+
</style>

0 commit comments

Comments
 (0)