You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/content-picker/readme.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ function MyComponent( props ) {
40
40
|`content`|`array`|`[]`| Array of items to pre-populate picker with. Must be in the format of: `[{id: 1, type: 'post', uuid: '...',}, {id: 1, uuid: '...', type: 'page'},... ]`. You cannot provide terms and posts to the same picker. `uuid` was added as of version 1.5.0. It is only used as the React component list key in the admin. If it is not included, `id` will be used which will cause errors if you select the same post twice. |
41
41
| `perPage` | `number` | `50` | Number of items to show during search
42
42
|`fetchInitialResults`|`bool`|`false`| Fetch initial results to present when focusing the search input |
43
+
|`options.inputDelay`|`number`|`undefined`| Debounce delay passed to the internal search input, defaults to 350ms |
43
44
|`PickedItemPreviewComponent`|`React.ComponentType<item>`|`undefined`| Allow replacing the default picked item preview. The `item` prop includes information about the selected entry (please check the `PickedItemType` interface in `./PickedItem.tsx`). ||
44
45
__NOTE:__ Content picker cannot validate that posts you pass it via `content` prop actually exist. If a post does not exist, it will not render as one of the picked items but will still be passed back as picked items if new items are picked/sorted. Therefore, on save you need to validate that all the picked posts/terms actually exist.
The `useDebouncedInput` hook is a revision of the `@wordpress/components` version of the hook which exposes options, specifically to configure the debounce delay.
0 commit comments