SearchFieldUI Class
Represents a field in the PDF viewer toolbar that allows users to search for text within documents.
export declare class SearchFieldUI implements VisibilityElement, EventElement<SearchFieldEventMap>
- Inheritance:
-
SearchFieldUI
Remarks
This component provides functionality for text searching through user input, handling search queries and validation.
Properties
isVisible
The current visibility state of the element.
get isVisible(): boolean;
set isVisible(value: boolean);
Parameters
-
value
The new visibility state (true to show, false to hide).
Methods
addEventListener(K, (event: SearchFieldEventMap[K]) => void)
Adds an event listener for the specified event type.
addEventListener<K extends keyof SearchFieldEventMap>(type: K, listener: (event: SearchFieldEventMap[K]) => void): void;
Parameters
-
type
The event type/name to listen for.
-
listener
The callback function that will be invoked when the event is emitted.
setQuery(string)
Sets the search query and handles text searching.
setQuery(value: string): void;
Parameters
-
value
The search query string to find in the document.