Tutorial

hide_filters

hideFilters

You can disable default filters by using a hideFilters prop.

hideFilters: PropTypes.shape({
    tags: PropTypes.bool,
    name: PropTypes.bool,
    registeredWith: PropTypes.bool,
    stale: PropTypes.bool,
    operatingSystem: PropTypes.bool,
    all: PropTypes.bool,
})

By default all filters are set to true. You can override just part of it.

<InventoryTable
    hideFilters={{ name: true }}
/>

This props is also passed to custom fetch.

Hiding filters also removes their default values.

tags

Similar to showTags, it hides the tags filter.

name

Hides display name filter.

registeredWith

Hides registered with filter.

stale

Hides staleness filter.

operatingSystem

Hides Operating System filter.

all

Hides all the filters. It has a lower priority than specific keys. You can hide all filter and then turn on specific ones. This makes sure that there will be no additional filters in the future.

Example

  • name is shown
  • all others are hidden
<InventoryTable
    hideFilters={{ all: true, name: false }}
/>