Skip to content

Highlighter Crashes on Numeric Values #65

@epligrow

Description

@epligrow

Summary

Wrapping a numeric value in a Highlight component utilizing the search property has the potential to cause a TypeError.

image

Expected Behavior

The Highlighter should show the matching string within the return results. Here is an example of this working as expected with the search term of "test".

image

How to Replicate

Using the first image as an example, if the value of cell is numeric (ex. 1234 instead of "1234"), and the value of query is a partial match (ex. 123), the component breaks, citing the following:

image

Workaround

A workaround for this issue is to either call the toString() method or wrap the value in a String constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions