Skip to content

Commit

Permalink
fix: hide placeholder, label, and helper text when skeleton is enabled (
Browse files Browse the repository at this point in the history
#2748)

Co-authored-by: Akshat Patel <[email protected]>
  • Loading branch information
abiramcodes and Akshat55 authored Jan 5, 2024
1 parent 52a8585 commit ebb57a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dropdown/dropdown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { hasScrollableParents } from "carbon-components-angular/utils";
selector: "cds-dropdown, ibm-dropdown",
template: `
<label
*ngIf="label"
*ngIf="label && !skeleton"
[for]="id"
class="cds--label"
[ngClass]="{'cds--label--disabled': disabled}">
Expand Down Expand Up @@ -151,7 +151,7 @@ import { hasScrollableParents } from "carbon-components-angular/utils";
</div>
</div>
<div
*ngIf="helperText && !invalid && !warn"
*ngIf="helperText && !invalid && !warn && !skeleton"
class="cds--form__helper-text"
[ngClass]="{
'cds--form__helper-text--disabled': disabled
Expand Down Expand Up @@ -557,7 +557,7 @@ export class Dropdown implements OnInit, AfterContentInit, AfterViewInit, OnDest
* otherwise the placeholder will be returned.
*/
getDisplayStringValue(): Observable<string> {
if (!this.view) {
if (!this.view || this.skeleton) {
return;
}
let selected = this.view.getSelected();
Expand Down

0 comments on commit ebb57a9

Please sign in to comment.