Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overlayOptions properties to p-autocomplete, fixes #12600 #12601

Merged
merged 5 commits into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ export const AUTOCOMPLETE_VALUE_ACCESSOR: any = {
<p-overlay
#overlay
[(visible)]="overlayVisible"
[options]="virtualScrollOptions"
[options]="overlayOptions"
[target]="'@parent'"
[appendTo]="appendTo"
[autoZIndex]="autoZIndex"
[baseZIndex]="baseZIndex"
[showTransitionOptions]="showTransitionOptions"
[hideTransitionOptions]="hideTransitionOptions"
(onAnimationStart)="onOverlayAnimationStart($event)"
Expand Down Expand Up @@ -371,36 +373,51 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
* @group Props
*/
@Input() type: string = 'text';
/**
* Whether to automatically manage layering.
* @group Props
*/
@Input() autoZIndex: boolean = true;
/**
* Base zIndex value to use in layering.
* @group Props
*/
@Input() baseZIndex: number = 0;

/* @deprecated */
_autoZIndex: boolean;
@Input() get autoZIndex(): boolean {
return this._autoZIndex;
}
set autoZIndex(val: boolean) {
this._autoZIndex = val;
console.warn('The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.');
}

/* @deprecated */
_baseZIndex: number;
@Input() get baseZIndex(): number {
return this._baseZIndex;
}
set baseZIndex(val: number) {
this._baseZIndex = val;
console.warn('The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.');
}

/**
* Defines a string that labels the input for accessibility.
* @group Props
*/
@Input() ariaLabel: string | undefined;

/**
* Defines a string that labels the dropdown button for accessibility.
* @group Props
*/
@Input() dropdownAriaLabel: string | undefined;

/**
* Specifies one or more IDs in the DOM that labels the input field.
* @group Props
*/
@Input() ariaLabelledBy: string | undefined;

/**
* Icon class of the dropdown icon.
* @group Props
*/
@Input() dropdownIcon: string | undefined;

/**
* Ensures uniqueness of selected items on multiple mode.
* @group Props
Expand Down