Skip to content
qubeejs/angular
API/createQubeeMemoryAdapter

createQubeeMemoryAdapter

function@qubeejs/angularsrc/lib/lists/memory-adapter.ts

Create an adapter that keeps a list’s query in memory, out of the address bar

For a list that lives inside something else — a dialog, a picker, a second table on the same screen — whose state would otherwise add history entries nobody goes back to. There is no history: replace makes no difference and there is no Back. Everything else — typed state, set(), debounce, request — behaves as with a URL.

Pass it to one list for state that belongs to one component, or provide it with provideQubeeMemoryAdapter to share it with a subtree:

readonly tags = injectQubeeList(tagList, { adapter: createQubeeMemoryAdapter('status=draft') });
createQubeeMemoryAdapter(initialSearch: SearchParamsInput): QubeeListAdapter
Parameter Type Description
initialSearch SearchParamsInput The query the state starts from, in any shape readListState() takes.

Returns — An adapter whose location starts at initialSearch