Skip to main content

SearchPillProps

Props for SearchPill.

This is an interface exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import type { SearchPillProps } from "@mapcairn/map";

interface SearchPillProps

Properties​

getBias​

readonly getBias?: () => Bounds | undefined;

Returns the box to favour results inside, usually the visible map. Read once when each search is submitted. Optional, and passed to useSearch, whose note on what a bias sends applies.

onBlur​

readonly onBlur?: FocusEventHandler<HTMLInputElement>;

Passed through from the input, for example to close the search surface.

onFocus​

readonly onFocus?: FocusEventHandler<HTMLInputElement>;

Passed through from the input, for example to open the search surface.

onSelect​

readonly onSelect: (result: SearchResult) => void;

Called when the user picks a result, by click, tap or Enter.

See also​

Source: packages/map/src/tools/SearchPill/SearchPill.tsx:29