filterLibrary

filterLibrary

Description

The filterLibrary property allows you to decide which view to display in the library.

Types

export type FilterLibrary = (components?: Component[]) => Component[];

Usage

To use the filterLibrary property, return a modified instance of the components. We identify the views that you want to filter by and remove the components from the Library view.

Here's an example of how to implement filterLibrary:

<Vizzly.Dashboard
  filterLibrary={components => {
    return components.filter(component => component.attributes.type === 'progress');
  }}
  // ... rest of the props
/>