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

Feature: allow OpenLayers Filter instances in WfsFilterUtil #1349

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

ahennr
Copy link
Member

@ahennr ahennr commented Mar 4, 2024

This PR introduces some new functionality to the existing WfsFilterUtil such that filters created by attributeDetails in a searchConfig can either

const myConfig: SearchConfig = {
  ...searchConfig,
  filter: olFilter,
  olFilterOnly: true
};
const myConfig: SearchConfig = {
  ...searchConfig,
  filter: olFilter,
  olFilterOnly: false
};

If no filter is passed in searchConfig, the filter creation is performed as currently implemented.

Plz review @terrestris/devs

@ahennr
Copy link
Member Author

ahennr commented Mar 4, 2024

Partially solves !22

* @private
*/
static createWfsFilter(
featureType: string,
searchTerm: string,
attributeDetails: AttributeDetails
): OlFormatFilter | null {
): OlFilter | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

isn't this one a breaking change? (method return type is changed)

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed OlFormatFilter to OlFilter, so here's no breaking change imho. On the other hand, I agree that switch of null to undefined is rather a breaking change. I'll change the commit message accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please check again @annarieger 🙏🏼

BREAKING CHANGE: createWfsFilter returs an OLFilter instance / undefined
now
@ahennr ahennr merged commit c0ea690 into main Mar 5, 2024
1 check passed
@ahennr ahennr deleted the wfs-util-ol-filter branch March 5, 2024 13:18
Copy link

github-actions bot commented Mar 5, 2024

🎉 This PR is included in version 16.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants