From 823a32ea1bd2b9ef7b086b42492784ee4a250f7e Mon Sep 17 00:00:00 2001 From: Matt Wagner Date: Mon, 7 Oct 2019 13:02:10 -0400 Subject: [PATCH] Add Placeholder to GoSelect Documentation Seeing that are looking to add the Placeholder to the GoSelect box in v1.3.0, we should also release with up to date documentation on the GoSelect box that includes implementing the placeholder. This adds the placeholder documentation to the GoSelect page. --- .../select-docs/select-docs.component.html | 34 +++++++++++++++++++ .../select-docs/select-docs.component.ts | 13 +++++++ 2 files changed, 47 insertions(+) diff --git a/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.html b/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.html index ba1948c4c..102ef2cfe 100644 --- a/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.html +++ b/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.html @@ -246,4 +246,38 @@

Code

+ + +

Component Placeholder

+
+ +

+ Sometimes we may want to be able to add a placeholder for the select box. We can achieve this through the + @Input() placeholder: string; binding. Setting + placeholder to a string will display that string by default in the + select box. When you select an option in the select box, it will replace the placeholder with the selected item. +

+
+
+

View

+ +
+
+

Code

+ +
+
+
+
diff --git a/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.ts b/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.ts index 4296af931..1b11fa96d 100644 --- a/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.ts +++ b/projects/go-style-guide/src/app/features/ui-kit/components/form-docs/components/select-docs/select-docs.component.ts @@ -16,6 +16,7 @@ export class SelectDocsComponent implements OnInit { select5: FormControl = new FormControl(''); select6: FormControl = new FormControl(''); select7: FormControl = new FormControl(''); + select8: FormControl = new FormControl(''); hints: Array = ['please select you favorite candy']; @@ -105,6 +106,18 @@ export class SelectDocsComponent implements OnInit { > `; + select8Code: string = ` + + `; + ngOnInit(): void { setTimeout((): void => { this.select5.setErrors([