Skip to content

Mismatch between compile-time and runtime type checking for columns.field #767

Closed
@hill-giant

Description

@hill-giant

Describe the bug
Support for passing an array to the 'field' attribute of a column was previously added in #417 to allow the selection of keys with full-stops. Although the the type of the field was updated in the type declaration file, prop-types.js was not updated to reflect these changes, resulting in runtime errors.

To Reproduce
Steps to reproduce the behavior:

  1. Pass a string array to a column field.
  2. Run in development.
  3. Go to dev console.
  4. See error.

Expected behavior
Column fields of type string array should not result in runtime errors.

Screenshots
Screenshot_20230516_115751

Demo

Solution
Update prop-types.js to allow both type string array and type string for columns.field.

This is an easy fix, which I will gladly put up for review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions