Added autocomplete property
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-03-10 14:28:50 +01:00
parent 6d437d0e2e
commit 0cd4e2ad9e
4 changed files with 15 additions and 3 deletions

View File

@ -23,7 +23,6 @@ export default class Autocomplete extends Field {
this._selection = null;
this.input = this.element.querySelector('input');
this.input.setAttribute('autocomplete', 'off');
}
$postLink() {

View File

@ -3,7 +3,8 @@
ng-model="$ctrl.search"
class="dense search"
ng-blur="$ctrl.onFocusOut()"
placeholder="{{::'Search' | translate}}">
placeholder="{{::'Search' | translate}}"
autocomplete="off">
</vn-textfield>
</div>
<div class="list" tabindex="-1">

View File

@ -132,6 +132,17 @@ export default class Field extends FormInput {
return this.error || this.inputError || null;
}
get autocomplete() {
return this._autocomplete;
}
set autocomplete(value) {
this._autocomplete = value;
console.log(value);
if (value === 'off')
this.input.setAttribute('autocomplete', 'off');
}
refreshHint() {
let error = this.shownError;
let hint = error || this.hint;
@ -206,6 +217,7 @@ ngModule.vnComponent('vnField', {
controller: Field,
bindings: {
type: '@?',
autocomplete: '@?',
placeholder: '@?',
value: '=?',
info: '@?',

View File

@ -129,7 +129,7 @@
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<vn-button class="round message xs vn-mb-sm"
<vn-button class="round sm vn-mb-sm"
icon="icon-recovery"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.openBalanceDialog()"