UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

20 lines 1.64 kB
define(["require", "exports", "tslib", "react", "../../FloatingSuggestionsComposite/FloatingPeopleSuggestions/FloatingPeopleSuggestions", "../../SelectedItemsList/SelectedPeopleList/SelectedPeopleList", "../UnifiedPicker"], function (require, exports, tslib_1, React, FloatingPeopleSuggestions_1, SelectedPeopleList_1, UnifiedPicker_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnifiedPeoplePicker = function (props) { var renderSelectedItems = React.useCallback(function (selectedPeopleListProps) { return React.createElement(SelectedPeopleList_1.SelectedPeopleList, tslib_1.__assign({}, selectedPeopleListProps, { ref: null })); }, // Intentional extra dependency to cause a new callback to be generated // eslint-disable-next-line react-hooks/exhaustive-deps [props.selectedItemsListProps.selectedItems]); var renderFloatingPeopleSuggestions = React.useCallback(function (floatingPeoplePickerProps) { return React.createElement(FloatingPeopleSuggestions_1.FloatingPeopleSuggestions, tslib_1.__assign({}, floatingPeoplePickerProps)); }, // Intentional extra dependency to cause a new callback to be generated // eslint-disable-next-line react-hooks/exhaustive-deps [props.floatingSuggestionProps.suggestions]); return (React.createElement(UnifiedPicker_1.UnifiedPicker, tslib_1.__assign({}, props, { onRenderSelectedItems: renderSelectedItems, onRenderFloatingSuggestions: renderFloatingPeopleSuggestions }))); }; }); //# sourceMappingURL=UnifiedPeoplePicker.js.map