From 4d36a01bc66802868f09460ec4fdd04ac55c1601 Mon Sep 17 00:00:00 2001 From: Adithya Sreyaj Date: Fri, 18 Mar 2022 16:04:15 +0530 Subject: [PATCH 1/3] feat(select): configurable clear selected option --- .../components/src/select/select.component.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/projects/components/src/select/select.component.ts b/projects/components/src/select/select.component.ts index dd41d9256..f30cc2d54 100644 --- a/projects/components/src/select/select.component.ts +++ b/projects/components/src/select/select.component.ts @@ -69,9 +69,9 @@ import { SelectSize } from './select-size'; - - + + - + - - + + + @@ -137,7 +137,7 @@ import { SelectSize } from './select-size'; -
+ +
implements ControlValueAccessor, AfterContentIni @Input() public showBorder: boolean = false; + @Input() + public showClearSelected: boolean = true; + @Input() public justify?: SelectJustify; From 7635a57e677cf10eaa2d113f72bf83543a6f0b77 Mon Sep 17 00:00:00 2001 From: Adithya Sreyaj Date: Mon, 21 Mar 2022 15:12:16 +0530 Subject: [PATCH 2/3] feat(select): default show clear selected to false --- projects/components/src/select/select.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/components/src/select/select.component.ts b/projects/components/src/select/select.component.ts index f30cc2d54..9fadab826 100644 --- a/projects/components/src/select/select.component.ts +++ b/projects/components/src/select/select.component.ts @@ -225,7 +225,7 @@ export class SelectComponent implements ControlValueAccessor, AfterContentIni public showBorder: boolean = false; @Input() - public showClearSelected: boolean = true; + public showClearSelected: boolean = false; @Input() public justify?: SelectJustify; From 6c77a408af5958d8937fe169061364b102a5a79e Mon Sep 17 00:00:00 2001 From: Adithya Sreyaj Date: Mon, 21 Mar 2022 21:20:35 +0530 Subject: [PATCH 3/3] test(select): fix test cases --- projects/components/src/select/select.component.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/components/src/select/select.component.test.ts b/projects/components/src/select/select.component.test.ts index 3213d7986..e962a3f5b 100644 --- a/projects/components/src/select/select.component.test.ts +++ b/projects/components/src/select/select.component.test.ts @@ -346,7 +346,7 @@ describe('Select Component', () => { test('should show clear selected button', fakeAsync(() => { spectator = hostFactory( ` - + `,