Skip to content

Add Typescript Typing for "selectionChanged" event  #1225

@qingwang96

Description

@qingwang96

For the "selectionChanged" event on PeoplePicker component and others such as TeamsChannelPicker, the Typescript typing for the event property is not specified past the global React "Event" type.

Could somebody help to clarify the expected event structure in Typescript?

From "react.ts" in generated node_modules:

export type PeoplePickerProps = {
	groupId?: string;
	type?: PersonType;
	groupType?: GroupType;
	transitiveSearch?: boolean;
	people?: IDynamicPerson[];
	selectedPeople?: IDynamicPerson[];
	defaultSelectedUserIds?: string[];
	placeholder?: string;
	selectionMode?: string;
	showMax?: number;
	disabled?: boolean;
	templateContext?: TemplateContext;
	mediaQuery?: ComponentMediaQuery;
	selectionChanged?: (e: Event) => void;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done ✔️

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions