(keyword = this.keyword, section = this.section)
| 286 | } |
| 287 | |
| 288 | searchInSection(keyword = this.keyword, section = this.section) { |
| 289 | if (!section) return |
| 290 | |
| 291 | const subitems = section.find(keyword) as unknown as IMatch[] |
| 292 | if (!subitems.length) return |
| 293 | |
| 294 | const navItem = section.navitem |
| 295 | if (navItem) { |
| 296 | const path = this.getNavPath(navItem) |
| 297 | path.pop() |
| 298 | return { |
| 299 | id: navItem.href, |
| 300 | excerpt: navItem.label, |
| 301 | description: path.map((i) => i.label).join(' / '), |
| 302 | subitems: subitems.map((i) => ({ ...i, id: i.cfi! })), |
| 303 | expanded: true, |
| 304 | } |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | search(keyword = this.keyword) { |
| 309 | // avoid blocking input |
no test coverage detected