@jsvision/ui / findDialog
Function: findDialog()
findDialog(
host,initial?):Promise<FindRec|null>
Defined in: ui/src/editor/dialogs.ts:56
Open the Find dialog — a text field with "Case sensitive" and "Whole words only" checkboxes.
Parameters
host
The modal host ({ loop: app.loop, desktop: app.desktop }).
initial?
Optional values to pre-fill the field and checkboxes.
Returns
Promise<FindRec | null>
The entered search record, or null if the user cancels.
Example
ts
const rec = await findDialog(
{ loop: app.loop, desktop: app.desktop },
{ find: 'fox', options: { caseSensitive: false, wholeWords: false } },
);
if (rec !== null) console.log('search for', rec.find);