Skip to content

Conversation

ericsoderberghp
Copy link
Contributor

What does this PR do?

Changes Data to handle nested objects in the data as properties.
Now, you can use properties={ 'location.city': { ...} } and it will do what you might suspect.

Also, I combined options and range into a single useMemo() in DataFilter to be more efficient.

Where should the reviewer start?

Take a look at the new Complex story under Data.

What testing has been done on this PR?

Added the Complex story to test interaction with both range and options versions.

How should this be manually tested?

Complex story

Do Jest tests follow these best practices?

no jest changes

Any background context you want to provide?

What are the relevant issues?

#6638

Screenshots (if appropriate)

Do the grommet docs need to be updated?

yes

Should this PR be mentioned in the release notes?

yes

Is this change backwards compatible or is it a breaking change?

backwards compatible

@ericsoderberghp ericsoderberghp linked an issue Feb 22, 2023 that may be closed by this pull request
Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality looks good! Can we add a unit test for this?

Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for adding story and test.

Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ericsoderberghp ericsoderberghp merged commit c9b92f5 into master Feb 22, 2023
@ericsoderberghp ericsoderberghp deleted the fix/data-paths branch February 22, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data and DataFilters should accept nested objects
3 participants