PhoenixKitCatalogue. Web. Components. PdfSearchModal
(PhoenixKitCatalogue v0.1.17)
Copy Markdown
View Source
LiveComponent that searches the PDF library for any page whose text matches one of the given item's translated names.
Mount with <.live_component module={PdfSearchModal} id="pdf-search-modal" item={@item} show={@show_pdf_search} />. The parent LV owns
:show_pdf_search and toggles it on a button click; the modal
closes by sending {:pdf_search_modal_closed} back to the parent
via send/2.
Each hit row links to PdfDetailLive with ?page=N so PDF.js
scrolls the embedded viewer to that page.
Layout
Results are grouped by PDF — every matching PDF gets a header row
(filename + total match count, opens the detail page in a new tab)
followed by a preview of the first @per_pdf hits. Per-PDF "Show N
more matches" expands the group with another batch via
Catalogue.more_pdf_matches_for_item/3.