`setTargetPages`
function.const searchPluginInstance = searchPlugin();const { setTargetPages } = searchPluginInstance;
setTargetPages((targetPage: SearchTargetPage) => boolean): void;
`SearchTargetPage`
type has two properties:Property | Type | Description | From |
---|---|---|---|
`numPages` | `number` | The total number of pages | 2.7.2 |
`pageIndex` | `number` | The index of page | 2.7.2 |
`setTargetPages`
function:// Only search in even pagessetTargetPages((targetPage) => targetPage.pageIndex % 2 === 0);// Only search in the page 4setTargetPages((targetPage) => targetPage.pageIndex === 3);