2220 - Added clearDisabled param
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e25b87213b
commit
048f01305d
|
@ -13,7 +13,7 @@
|
|||
</label>
|
||||
</div>
|
||||
<div class="icons pre">
|
||||
<vn-icon
|
||||
<vn-icon ng-show="::$ctrl.clearDisabled != true"
|
||||
icon="clear"
|
||||
translate-attr="{title: 'Clear'}"
|
||||
ng-click="$ctrl.onClear($event)">
|
||||
|
|
|
@ -203,6 +203,7 @@ ngModule.vnComponent('vnField', {
|
|||
type: '@?',
|
||||
autocomplete: '@?',
|
||||
placeholder: '@?',
|
||||
clearDisabled: '<?',
|
||||
value: '=?',
|
||||
info: '@?',
|
||||
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 Field from '../field';
|
||||
import './style.scss';
|
||||
|
||||
export default class Textarea extends Field {
|
||||
constructor($element, $scope, $compile) {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
.vn-textarea {
|
||||
& > .container {
|
||||
& > .icons {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue