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

Always call onChange to provide the OData options on mount #59

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

thgreasi
Copy link
Contributor

@thgreasi thgreasi commented Nov 20, 2023

}
: undefined)}
>
{(data == null || Array.isArray(data)) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already had the Array.isArray(), which we could drop if we drop support for rendering objects in autoUI.
The data == null is necessary for the Filters to be mounted (w/ display: none) even before the initial load of the data, so that they can parse the url (or fallback to defaults) and trigger $setFilters, which triggers onChange, which provides the pine options to the parent component, for it to use them to fetch the data.
Let me leave a comment :)

@thgreasi thgreasi marked this pull request as ready for review December 8, 2023 09:07
@thgreasi
Copy link
Contributor Author

thgreasi commented Dec 8, 2023

I self-certify!

@thgreasi thgreasi merged commit d3dd612 into main Dec 8, 2023
48 checks passed
@thgreasi thgreasi deleted the callOnChangeOnMount branch December 8, 2023 09:07
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.

None yet

2 participants