File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 13
13
v-bind:type ="{ 'is-danger': getAddUserMessage }"
14
14
v-bind:message ="getAddUserMessage"
15
15
)
16
- b-autocomplete(
17
- v-model ="newRoleMapping.username"
16
+ b-select(
18
17
placeholder ="e.g. Anne"
19
- open-on-focus =true
20
- v-bind:data ="otherUsers"
21
- field ="username"
22
- v-on:select ="option => {selected = option; newRoleMapping.userid = selected.id}"
23
- v-on:input ="value => checkValidExistingUser(value)"
24
- )
18
+ v-model ="newRoleMapping.username"
19
+ v-on:input ="option => {checkValidExistingUser(option); newRoleMapping.userid = option}"
20
+ )
21
+ option( v-for ="otherUser in otherUsers" , v-bind:value ="otherUser.id" , v-bind:key ="otherUser.id" )
22
+ | {{ otherUser.username }}
25
23
26
24
div.column
27
25
b-field( label ="Role" )
68
66
span Delete
69
67
</template >
70
68
71
- <style scoped >
69
+ <style >
72
70
.user-table {
73
71
padding : 40px 20px ;
74
72
}
73
+
74
+ .user-table .table {
75
+ width : 100% ;
76
+ }
77
+
78
+ .user-table .card {
79
+ padding : 20px 20px ;
80
+ }
81
+
82
+ .user-table .has-addons {
83
+ display : none ;
84
+ }
85
+
75
86
</style >
76
87
77
88
<script >
@@ -138,7 +149,7 @@ export default {
138
149
},
139
150
140
151
checkValidExistingUser (inputValue ) {
141
- this .hasNewUserError = ! this .otherUsers .some (user => user .username === inputValue);
152
+ this .hasNewUserError = ! this .otherUsers .some (user => user .id === inputValue);
142
153
return inputValue;
143
154
},
144
155
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue' ;
2
2
import Buefy from 'buefy' ;
3
3
import Users from '../components/users.vue' ;
4
- import 'buefy/dist/buefy.css' ;
5
4
6
5
Vue . use ( Buefy ) ;
7
6
You can’t perform that action at this time.
0 commit comments