Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only use useDataStoreBinding when predicate is set #86

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Sep 16, 2021

Resolves #84

Copy link
Contributor

@cwoolum cwoolum left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines -218 to -222
const { buttonUser } = useDataStoreBinding({
type: \\"record\\",
model: User,
criteria: buttonUserFilter,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this removed? We would need to be able to query a single record.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is removed because there is no predicate on the buttonUser binding properties. According to #84 we should not use useDataStoreBinding here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense.

@frimfram frimfram self-requested a review September 17, 2021 16:53
@dpilch dpilch marked this pull request as ready for review September 17, 2021 17:37
@dpilch dpilch merged commit ec079f1 into main Sep 17, 2021
@dpilch dpilch deleted the fix-datastore-binding branch September 17, 2021 17:37
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.

Component should not useDataStoreBinding hook when no predicates present
3 participants