2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Dropdown also known as Select, is used to choose an item from a collection of options.
|
|
|
|
*
|
2024-04-18 14:17:41 +00:00
|
|
|
* [Live Demo](https://www.primevue.org/select/)
|
2023-03-01 10:43:09 +00:00
|
|
|
*
|
|
|
|
* @module dropdown
|
|
|
|
*
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
import 'vue';
|
|
|
|
import * as Select from '../select';
|
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
2023-08-02 14:07:22 +00:00
|
|
|
|
2023-05-07 20:37:26 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) option method.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughMethodOptions<T> extends Select.SelectPassThroughMethodOptions<T> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Custom change event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link DropdownEmits.change}
|
2023-03-01 10:43:09 +00:00
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownChangeEvent extends Select.SelectChangeEvent {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
2023-03-03 14:17:03 +00:00
|
|
|
* Custom filter event.
|
2023-03-06 20:35:39 +00:00
|
|
|
* @see {@link DropdownEmits.filter}
|
2023-03-01 10:43:09 +00:00
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownFilterEvent extends Select.SelectFilterEvent {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-05-07 20:37:26 +00:00
|
|
|
/**
|
|
|
|
* Custom passthrough(pt) options.
|
|
|
|
* @see {@link DropdownProps.pt}
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughOptions<T = any> extends Select.SelectPassThroughOptions<T> {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom passthrough attributes for each DOM elements
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownPassThroughAttributes extends Select.SelectPassThroughAttributes {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current inline state in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownState extends Select.SelectState {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines current options in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownContext extends Select.SelectContext {}
|
2023-05-07 20:37:26 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownProps extends Select.SelectProps {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownSlots extends Select.SelectSlots {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in Dropdown component.
|
|
|
|
*/
|
2024-04-18 14:17:41 +00:00
|
|
|
export interface DropdownEmits extends Select.SelectEmits {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 10:43:09 +00:00
|
|
|
/**
|
2024-04-18 14:17:41 +00:00
|
|
|
* @deprecated Deprecated since v4. Use Select component instead.
|
|
|
|
*
|
2023-03-01 10:43:09 +00:00
|
|
|
* **PrimeVue - Dropdown**
|
|
|
|
*
|
|
|
|
* _Dropdown also known as Select, is used to choose an item from a collection of options._
|
|
|
|
*
|
2024-04-18 14:17:41 +00:00
|
|
|
* [Live Demo](https://www.primevue.org/select/)
|
2023-03-01 10:43:09 +00:00
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*/
|
2023-03-01 14:48:23 +00:00
|
|
|
declare class Dropdown extends ClassComponent<DropdownProps, DropdownSlots, DropdownEmits> {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Shows the overlay.
|
2023-03-01 10:43:09 +00:00
|
|
|
* @param {boolean} [isFocus] - Decides whether to focus on the component. @defaultValue false.
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
* @memberof Dropdown
|
|
|
|
*/
|
|
|
|
show: (isFocus?: boolean) => void;
|
|
|
|
/**
|
|
|
|
* Hides the overlay.
|
2023-03-01 10:43:09 +00:00
|
|
|
* @param {boolean} [isFocus] - Decides whether to focus on the component. @defaultValue false.
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
* @memberof Dropdown
|
|
|
|
*/
|
|
|
|
hide: (isFocus?: boolean) => void;
|
|
|
|
}
|
|
|
|
|
2024-03-14 22:58:11 +00:00
|
|
|
declare module 'vue' {
|
|
|
|
export interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Dropdown: GlobalComponentConstructor<Dropdown>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Dropdown;
|