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
|`onPickChange`|`function`|`undefined`| Callback function the list of picked content gets changed |
73
72
|`queryFilter`|`function`|`undefined`| Function called to allow you to customize the query before is made. It's advisable to use `useCallback` to save this parameter |
74
-
|`queryFieldsFilter`|`function`|`undefined`| Function to customize which fields are fetched from the API for both search and picked items. Receives `(fields: string[], mode: ContentSearchMode) => string[]`. It's advisable to use `useCallback` to save this parameter. |
73
+
|`queryFieldsFilter`|`function`|`undefined`| Function to customize which fields are fetched from the API for both search and picked items. Receives `(fields: string[], mode: ContentSearchMode) => string[]`. When requesting additional fields from the WordPress REST API search endpoint, you may need to register those fields in PHP using `register_rest_field` so that they are available on search results as well as on picked items. It's advisable to use `useCallback` to save this parameter. |
75
74
|`searchResultFilter`|`function`|`undefined`| Function to customize the normalized search result item. Receives `(item: NormalizedSuggestion, originalResult: WP_REST_API_Search_Result \| WP_REST_API_User) => NormalizedSuggestion`. It's advisable to use `useCallback` to save this parameter. |
76
75
|`pickedItemFilter`|`function`|`undefined`| Function to customize the picked item before it's displayed in the list. Receives `(item: Partial<PickedItemType>, originalResult: Post \| Term \| User) => Partial<PickedItemType>`. It's advisable to use `useCallback` to save this parameter. |
77
76
| `label` | `string` | `''` | Renders a label for the Search Field.
0 commit comments