@@ -18,6 +18,7 @@ Here is an example of the control:
1818``` TypeScript
1919import { ListItemPicker } from ' @pnp/spfx-controls-react/lib/ListItemPicker' ;
2020```
21+
2122- Use the ` ListItemPicker ` control in your code as follows:
2223
2324``` TypeScript
@@ -41,30 +42,31 @@ private onSelectedItem(data: { key: string; name: string }[]) {
4142 }
4243}
4344```
45+
4446## Implementation
4547
4648The ` ListItemPicker ` control can be configured with the following properties:
4749
48-
49- | Property | Type | Required | Description |
50- | ---- | ---- | ---- | ---- |
51- | columnInternalName | string | yes | InternalName of column to search and get values. |
52- | keyColumnInternalName | string | no | InternalName of column to use as the key for the selection. Must be a column with unique values. Default: Id |
53- | context | BaseComponentContext | yes | SPFx web part or extention context |
54- | listId | string | yes | Guid or title of the list. |
55- | itemLimit | number | yes | Number of items which can be selected |
56- | onSelectedItem | (items: any [ ] ) => void | yes | Callback function which returns the selected items. |
57- | className | string | no | ClassName for the picker. |
58- | webUrl | string | no | URL of the site. By default it uses the current site URL. |
59- | defaultSelectedItems | any [ ] | no | Initial items that have already been selected and should appear in the people picker. |
60- | suggestionsHeaderText | string | no | The text that should appear at the top of the suggestion box. |
61- | noResultsFoundText | string | no | The text that should appear when no results are returned. |
62- | disabled | boolean | no | Specifies if the control is disabled or not. |
63- | filter | string | no | condition to filter list Item, same as $filter ODATA parameter|
64- | orderBy | string | no | condition to order by list Item, same as $orderby ODATA parameter |
65- | placeholder | string | no | Short text hint to display in empty picker |
66- | substringSearch | boolean | no | Specifies if substring search should be used |
67- | label | string | no | Specifies the text describing the ListItemPicker. |
68- | enableDefaultSuggestions | boolean | no | Enable default suggestions. All options are displayed by default when clicking on the control. |
50+ | Property | Type | Required | Description |
51+ | ------------------------ | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
52+ | columnInternalName | string | yes | InternalName of column to search and get values. |
53+ | keyColumnInternalName | string | no | InternalName of column to use as the key for the selection. Must be a column with unique values. Default: Id |
54+ | context | BaseComponentContext | yes | SPFx web part or extention context |
55+ | listId | string | yes | Guid or title of the list. |
56+ | itemLimit | number | yes | Number of items which can be selected |
57+ | onSelectedItem | (items: any [ ] ) => void | yes | Callback function which returns the selected items. |
58+ | className | string | no | ClassName for the picker. |
59+ | webUrl | string | no | URL of the site. By default it uses the current site URL. |
60+ | defaultSelectedItems | any [ ] | no | Initial items that have already been selected and should appear in the people picker. |
61+ | suggestionsHeaderText | string | no | The text that should appear at the top of the suggestion box. |
62+ | noResultsFoundText | string | no | The text that should appear when no results are returned. |
63+ | disabled | boolean | no | Specifies if the control is disabled or not. |
64+ | filter | string | no | condition to filter list Item, same as $filter ODATA parameter |
65+ | orderBy | string | no | condition to order by list Item, same as $orderby ODATA parameter |
66+ | placeholder | string | no | Short text hint to display in empty picker |
67+ | substringSearch | boolean | no | Specifies if substring search should be used |
68+ | label | string | no | Specifies the text describing the ListItemPicker. |
69+ | enableDefaultSuggestions | boolean | no | Enable default suggestions. All options are displayed by default when clicking on the control. |
70+ | itemsQueryCountLimit | number | no | Number of items to display in a lookup field |
6971
7072![ ] ( https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ListItemPicker )
0 commit comments