primeng
Version:
[](https://badge.fury.io/js/primeng) [](https://www.npmjs.com/package/primeng) [ • 4.16 kB
TypeScript
import { EventEmitter, ChangeDetectorRef, TemplateRef } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { SelectButtonChangeEvent, SelectButtonOptionClickEvent } from './selectbutton.interface';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "primeng/ripple";
export declare const SELECTBUTTON_VALUE_ACCESSOR: any;
export declare class SelectButton implements ControlValueAccessor {
cd: ChangeDetectorRef;
/**
* An array of selectitems to display as the available options.
* @group Props
*/
options: any[] | undefined;
/**
* Name of the label field of an option.
* @group Props
*/
optionLabel: string | undefined;
/**
* Name of the value field of an option.
* @group Props
*/
optionValue: string | undefined;
/**
* Name of the disabled field of an option.
* @group Props
*/
optionDisabled: string | undefined;
/**
* Index of the element in tabbing order.
* @group Props
*/
tabindex: number;
/**
* When specified, allows selecting multiple values.
* @group Props
*/
multiple: boolean | undefined;
/**
* Inline style of the component.
* @group Props
*/
style: any;
/**
* Style class of the component.
* @group Props
*/
styleClass: string | undefined;
/**
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
* @group Props
*/
ariaLabelledBy: string | undefined;
/**
* When present, it specifies that the element should be disabled.
* @group Props
*/
disabled: boolean | undefined;
/**
* A property to uniquely identify a value in options.
* @group Props
*/
dataKey: string | undefined;
/**
* Callback to invoke on input click.
* @param {SelectButtonOptionClickEvent} event - Custom click event.
* @group Emits
*/
onOptionClick: EventEmitter<SelectButtonOptionClickEvent>;
/**
* Callback to invoke on selection change.
* @param {SelectButtonChangeEvent} event - Custom change event.
* @group Emits
*/
onChange: EventEmitter<SelectButtonChangeEvent>;
itemTemplate: TemplateRef<any>;
value: any;
onModelChange: Function;
onModelTouched: Function;
constructor(cd: ChangeDetectorRef);
getOptionLabel(option: any): any;
getOptionValue(option: any): any;
isOptionDisabled(option: any): any;
writeValue(value: any): void;
registerOnChange(fn: Function): void;
registerOnTouched(fn: Function): void;
setDisabledState(val: boolean): void;
onItemClick(event: Event, option: any, index: number): void;
onBlur(): void;
removeOption(option: any): void;
isSelected(option: any): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<SelectButton, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SelectButton, "p-selectButton", never, { "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "style": { "alias": "style"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dataKey": { "alias": "dataKey"; "required": false; }; }, { "onOptionClick": "onOptionClick"; "onChange": "onChange"; }, ["itemTemplate"], never, false, never>;
}
export declare class SelectButtonModule {
static ɵfac: i0.ɵɵFactoryDeclaration<SelectButtonModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<SelectButtonModule, [typeof SelectButton], [typeof i1.CommonModule, typeof i2.RippleModule], [typeof SelectButton]>;
static ɵinj: i0.ɵɵInjectorDeclaration<SelectButtonModule>;
}