1
ng-modelとselect itemの間の大文字小文字を無視する方法はありますか?UI-Select case Insensitive
この問題はlog.usernameがドロップダウンではなく入力ボックスだったので、古いユーザー名はすべて大文字と小文字を区別しています。
例:= "doej"
log.username。
lookupOptions.users = [{ユーザー名: "DoeJ" のfullName: "ジョー・ドウ"}、 {ユーザー名: "SmithM" のfullName: "MarySmith"}]
負荷では、選択が空の代わりに"DoeJ" を有する
<div class="form-group col-md-4">
<label>Stored By</label>
<ui-select ng-model="log.username" theme="bootstrap">
<ui-select-match placeholder="Select Site">{{$select.selected.username}}</ui-select-match>
<ui-select-choices repeat="option.username as option in lookupOptions.users | orderBy: 'username' | propsFilter: {'username': $select.search}">
<div ng-bind-html="option.username | highlight: $select.search"></div>
<small ng-bind-html="option.fullName | highlight: $select.search"></small>
</ui-select-choices>
</ui-select>
</div>
NG・リピート= "lookupOptions.usersのオプションとしてオプション" で、それが働いていますか? – Wandrille
残念ながらng-modelは正確な文字列値を探します。したがって、selectは空になり、それ以外の場合は 'log.username = 'DoeJ'' – gilango