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([