mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -93,7 +93,7 @@ export class CardViewSelectItemComponent extends BaseCardView<CardViewSelectItem
|
||||
|
||||
onChange(event: MatSelectChange): void {
|
||||
const selectedOption = event.value !== undefined ? event.value : null;
|
||||
this.cardViewUpdateService.update(<CardViewSelectItemModel<string>> { ...this.property }, selectedOption);
|
||||
this.cardViewUpdateService.update({ ...this.property } as CardViewSelectItemModel<string>, selectedOption);
|
||||
this.property.value = selectedOption;
|
||||
}
|
||||
|
||||
|
@@ -44,9 +44,9 @@ export class TestComponent {
|
||||
showInputFilter = true;
|
||||
multiple = false;
|
||||
standardOptions = [
|
||||
{ 'id': '1', 'name': 'one' },
|
||||
{ 'id': '2', 'name': 'two' },
|
||||
{ 'id': '3', 'name': 'three' }
|
||||
{ id: '1', name: 'one' },
|
||||
{ id: '2', name: 'two' },
|
||||
{ id: '3', name: 'three' }
|
||||
];
|
||||
options = this.standardOptions;
|
||||
|
||||
@@ -136,7 +136,7 @@ describe('SelectFilterInputComponent', () => {
|
||||
component.onModelChange('some-search-term');
|
||||
expect(component.term).toBe('some-search-term');
|
||||
|
||||
component.selectFilterInput.nativeElement.dispatchEvent(new KeyboardEvent('keydown', {'keyCode': ESCAPE} as any));
|
||||
component.selectFilterInput.nativeElement.dispatchEvent(new KeyboardEvent('keydown', {keyCode: ESCAPE} as any));
|
||||
fixture.detectChanges();
|
||||
expect(component.term).toBe('');
|
||||
});
|
||||
@@ -152,10 +152,10 @@ describe('SelectFilterInputComponent', () => {
|
||||
afterEach(() => testFixture.destroy());
|
||||
|
||||
it('should preserve the values for multiple search', async () => {
|
||||
const userSelection = [{ 'id': '3', 'name': 'three' }];
|
||||
const userSelection = [{ id: '3', name: 'three' }];
|
||||
const preSelected = [
|
||||
{ 'id': '1', 'name': 'one' },
|
||||
{ 'id': '2', 'name': 'two' }
|
||||
{ id: '1', name: 'one' },
|
||||
{ id: '2', name: 'two' }
|
||||
];
|
||||
testComponent.field.value = preSelected;
|
||||
testComponent.multiple = true;
|
||||
|
@@ -25,7 +25,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||
selector: 'adf-select-filter-input',
|
||||
templateUrl: './select-filter-input.component.html',
|
||||
styleUrls: ['./select-filter-input.component.scss'],
|
||||
host: { 'class': 'adf-select-filter-input' },
|
||||
host: { class: 'adf-select-filter-input' },
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class SelectFilterInputComponent implements OnInit, OnDestroy {
|
||||
@@ -79,6 +79,7 @@ export class SelectFilterInputComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.previousSelected = values;
|
||||
if (restoreSelection) {
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this.matSelect._onChange(values);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user