carbon-design-system / carbon-addons-iot-react

A collection of React components shared between IBM Watson IoT products.
https://carbon-design-system.github.io/carbon-addons-iot-react/
Apache License 2.0
96 stars 78 forks source link

[TableToolbarAdvancedFilterFlyout] Advanded filter error when columns are empty #3240

Open bjornalm opened 2 years ago

bjornalm commented 2 years ago

What package is this for?

Describe the bug

The TableToolbarAdvancedFilterFlyout fails and breaks the table when the columns are an empty array or undefined, e.g. when lazy loading columns and data.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a story using TableToolbarAdvancedFilterFlyout
  2. Modify the story to have no columns in the columns prop
  3. See error

Please create a reduced test case in CodeSandbox: https://codesandbox.io/s/github/carbon-design-system/carbon-addons-iot-react/tree/next/packages/react/examples/codesandbox

Expected behavior

No error thrown

Environment/versions:

Additional context

image

Add any other context about the problem here.

Specific timeline issues / requests

Do you want this work within a specific time period? Is it related to an upcoming release?

NB: The core contributors will try to work with your timeline, but it's not guaranteed. The earlier you make a request in advance of a desired delivery date, the better!

bjornalm commented 2 years ago

@JordanWSmith15 assigning this a severity:4 since the TableToolbarAdvancedFilterFlyout is experimental