File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 v-bind:type ="{ 'is-danger': getAddUserMessage }"
1414 v-bind:message ="getAddUserMessage"
1515 )
16- b-autocomplete(
17- v-model ="newRoleMapping.username"
16+ b-select(
1817 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 }}
2523
2624 div.column
2725 b-field( label ="Role" )
6866 span Delete
6967</template >
7068
71- <style scoped >
69+ <style >
7270.user-table {
7371 padding : 40px 20px ;
7472}
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+
7586 </style >
7687
7788<script >
@@ -138,7 +149,7 @@ export default {
138149 },
139150
140151 checkValidExistingUser (inputValue ) {
141- this .hasNewUserError = ! this .otherUsers .some (user => user .username === inputValue);
152+ this .hasNewUserError = ! this .otherUsers .some (user => user .id === inputValue);
142153 return inputValue;
143154 },
144155
Original file line number Diff line number Diff line change 11import Vue from 'vue' ;
22import Buefy from 'buefy' ;
33import Users from '../components/users.vue' ;
4- import 'buefy/dist/buefy.css' ;
54
65Vue . use ( Buefy ) ;
76
You can’t perform that action at this time.
0 commit comments