API/<MemoryAdapter>
<MemoryAdapter>
componentsrc/components/memory-adapter.tsx1 parameter
Keep the query of every list below it in memory instead of the URL, and share it between them — the filters, the table and the pager of a list in a dialog.
The state lives in the provider: it starts from initialSearch and is gone when the provider
unmounts. There is no history, so replace makes no difference and there is no Back. Nesting
scopes a subtree: the nearest adapter provider wins. For a list that one component drives
alone, useMemoryAdapter needs no provider.
Import
Section titled “Import”import { MemoryAdapter } from '@qubeejs/react';Signature
Section titled “Signature”function MemoryAdapter(props: MemoryAdapterProps): ReactElementParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
props |
MemoryAdapterProps |
The subtree, and the query to start from |
Returns
Section titled “Returns”The subtree, with the adapter in context
Example
Section titled “Example”<MemoryAdapter initialSearch="status=draft"> <TagFilters /> <TagTable /></MemoryAdapter>