Skip to main content

SelectionProvider

Hands the selected set down to the components that show or change it, so none needs a prop for it. Put it where the host calls useFeatureSelection, around the map and the sheet. With selection null it provides nothing, so a host with no store passes the hook's result as it is.

This is a function exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import { SelectionProvider } from "@mapcairn/map";

function SelectionProvider(input: SelectionProviderProps): JSX.Element;

Parameters​

  • { selection, children, }
  • input (SelectionProviderProps)

Returns​

JSX.Element

See also​

Source: packages/map/src/layers/SelectionProvider.tsx:24