Skip to content

Data Table sort breaks if a property is null or undefined #6281

@ucbdiaz2015

Description

@ucbdiaz2015

Expected Behavior

Undefined properties should be treated as empty string

Actual Behavior

When sorting a column, items are not re-ordered as expected if an item in the table has the property set to null or undefined

URL, screen shot, or Codepen exhibiting the issue

See Codesandbox

Screen Shot 2022-08-17 at 9 25 56 AM

Steps to Reproduce

On Code sandbox - sort by Parent_id

Your Environment

  • Grommet version: 2.23.0, also reproducible w/ 2.25.1
  • Browser Name and version: Chrome Version 104.0.5112.79 (Official Build) (x86_64)
  • Operating System and version (desktop or mobile): NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions