From 519d4460ae8141e1060e7235bab62fc08c08ee77 Mon Sep 17 00:00:00 2001
From: Diego Franchina
Date: Thu, 4 Jan 2024 18:21:33 +0100
Subject: [PATCH] fix type optionLabel and format code
---
src/app/components/autocomplete/autocomplete.ts | 2 +-
src/app/showcase/doc/guides/csslayer/specificitydoc.ts | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts
index 02ba2686edb..a294a053117 100755
--- a/src/app/components/autocomplete/autocomplete.ts
+++ b/src/app/components/autocomplete/autocomplete.ts
@@ -555,7 +555,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
* Property name or getter function to use as the label of an option.
* @group Props
*/
- @Input() optionLabel: string | undefined;
+ @Input() optionLabel: string | ((item: any) => string) | undefined;
/**
* Unique identifier of the component.
* @group Props
diff --git a/src/app/showcase/doc/guides/csslayer/specificitydoc.ts b/src/app/showcase/doc/guides/csslayer/specificitydoc.ts
index 639276ffda0..8c21cc6571c 100644
--- a/src/app/showcase/doc/guides/csslayer/specificitydoc.ts
+++ b/src/app/showcase/doc/guides/csslayer/specificitydoc.ts
@@ -12,8 +12,8 @@ import { Code } from 'src/app/showcase/domain/code';
For example, let's assume you need to remove the rounded borders of the InputSwitch component defined by the theme in use. In order to achieve this, .p-inputswitch .p-inputswitch-slider selector needs to be overriden. Without
- the layers, we'd have to write a stronger css or use !important however, with layers, this does not present an issue as your CSS can always override PrimeNG with a more straightforward class name such as
- my-inputswitch. Another advantage of this approach is that it does not force you to figure out the built-in class names of the components.
+ the layers, we'd have to write a stronger css or use !important however, with layers, this does not present an issue as your CSS can always override PrimeNG with a more straightforward class name such as my-inputswitch.
+ Another advantage of this approach is that it does not force you to figure out the built-in class names of the components.