Forum Discussion

PraveenM's avatar
PraveenM
Copper Contributor
Nov 03, 2019

How do I get selected Items from ListItemPicker react control?

<ListItemPicker listId={this.state.selectedList}
                  columnInternalName="Title"
                  itemLimit={5}
                  context={this.props.context}
                  onSelectedItem={this.onSelectedItem} />
 
private onSelectedItem(carNumbers: { key: stringname: string }[]) {
  this.state.ListItemPickerItems.length = 0;
  for (const carNumber of carNumbers) {
    this.state.ListItemPickerItems.push(carNumber.name);
    alert(`Item value: ${carNumber.name}`);
  }
}
No RepliesBe the first to reply

Resources