Merge pull request '2220-field_hide_clear' (#297) from 2220-field_hide_clear into dev
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
commit
35bf0b57be
|
@ -13,7 +13,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="icons pre">
|
<div class="icons pre">
|
||||||
<vn-icon
|
<vn-icon ng-show="::$ctrl.clearDisabled != true"
|
||||||
icon="clear"
|
icon="clear"
|
||||||
translate-attr="{title: 'Clear'}"
|
translate-attr="{title: 'Clear'}"
|
||||||
ng-click="$ctrl.onClear($event)">
|
ng-click="$ctrl.onClear($event)">
|
||||||
|
|
|
@ -203,6 +203,7 @@ ngModule.vnComponent('vnField', {
|
||||||
type: '@?',
|
type: '@?',
|
||||||
autocomplete: '@?',
|
autocomplete: '@?',
|
||||||
placeholder: '@?',
|
placeholder: '@?',
|
||||||
|
clearDisabled: '<?',
|
||||||
value: '=?',
|
value: '=?',
|
||||||
info: '@?',
|
info: '@?',
|
||||||
required: '<?',
|
required: '<?',
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
describe('Component vnField', () => {
|
||||||
|
let $element;
|
||||||
|
let controller;
|
||||||
|
|
||||||
|
beforeEach(ngModule('vnCore'));
|
||||||
|
|
||||||
|
beforeEach(inject(($compile, $rootScope) => {
|
||||||
|
$element = $compile(`<vn-textfield></vn-textfield>`)($rootScope);
|
||||||
|
controller = $element.controller('vnTextfield');
|
||||||
|
}));
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
$element.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove this block
|
||||||
|
describe('clearDisabled binding', () => {
|
||||||
|
it(`should enable the show property`, () => {
|
||||||
|
controller.clearDisabled = true;
|
||||||
|
|
||||||
|
expect(controller.clearDisabled).toEqual(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,5 +1,6 @@
|
||||||
import ngModule from '../../module';
|
import ngModule from '../../module';
|
||||||
import Field from '../field';
|
import Field from '../field';
|
||||||
|
import './style.scss';
|
||||||
|
|
||||||
export default class Textarea extends Field {
|
export default class Textarea extends Field {
|
||||||
constructor($element, $scope, $compile) {
|
constructor($element, $scope, $compile) {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
.vn-textarea {
|
||||||
|
& > .container {
|
||||||
|
& > .icons {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue