Skip to main content

CnSavedViewsWidget

The reader's own saved views as a list of links, the "Opgeslagen weergaven" card of a board dashboard. Registered under the saved-views widget type.

saved-view draws the rows of ONE view that the manifest names by id. This widget lists the views themselves and has no id to configure, so a view the user saves later shows up without a manifest change. It asks the Views API for the signed-in user's views, keeps those that belong to the configured source, and links each to the index page's route with the view's filters, search and sort in the query, which the index page applies on load.

Content shape​

{
"type": "saved-views",
"title": "Opgeslagen weergaven",
"content": {
"register": "pipelinq",
"schema": "ticket",
"route": "Tickets",
"showCounts": true,
"limit": 10,
"emptyText": "Je hebt nog geen opgeslagen weergaven."
}
}
KeyMeaning
register, schemaThe source of the index page. A view belongs to it when it was saved there (its scope, or the schemas and registers it names). A view that names neither is shown everywhere.
scopeThe index page's savedViewsScope, when the page overrides the default scope.
routeThe name of the index page's route, or a location { name, params }. Each link carries the view's state as its query. Without it the names are plain text.
ownDefault true: only the signed-in user's own views. false adds the views shared with them.
showCountsAdds how many records each view matches, Van mij, alle statussen (9): one list request per view. A view whose count failed shows its name only.
limitThe most views shown. Default 10.
emptyText, errorTextThe lines for no views and for a failed read.

The list is read on load and on a page refresh. A saved view's own filters are the ones that count, so the count of a view saved with a search term ignores the search.

The api prop ({ fetchViews }) replaces the Views API transport, for tests and hosts that stub it; by default the widget uses useSavedViewsApi.

OpenRegister reliance​

medium: this component relies on OpenRegister for part of what it does. 0 direct references, 5 files reached through imports.

See the reliance overview for the filterable list.

Props​

NameTypeRequiredDefaultDescription
contentunion\{\}The configuration: { register, schema, scope?, route, own?, showCounts?, limit?, emptyText?, errorText? }. register and schema (or scope, the index page's savedViewsScope) pick the views of one list page; route is the name of that index page's route; own (default true) keeps the signed-in user's views only; showCounts adds how many records each view matches; limit caps the list (default 10).
api{fetchViews: Function}|nullnullInjected views API, for tests and hosts that stub the transport.