문제

I want to change a state when the user remove a person from people picker?

  <NormalPeoplePicker
                onChange={this._onChange.bind(this)}
                onResolveSuggestions={this._onFilterChanged}
                getTextFromItem={(persona: IPersonaProps) => persona.primaryText}
                pickerSuggestionsProps={suggestionProps}
                className={'ms-PeoplePicker'}
                key={'normal'}
                itemLimit={1}
                // defaultSelectedItems={this.state.selectedItems}
                onRemoveSuggestion={}

              />

Thanks

도움이 되었습니까?

해결책

We have to use the onChange method on the component private _onChange = (items: IPersonaProps[]) => { this.setState({ selectedItems: items }); } See my detailed post regarding this implementation http://www.thesharepointguide.com/sharepoint-framework-office-ui-fabric/

Hope this helps

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top