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

feat(ogc-filter/dom): allow domain of values to fill ogc-filter selec… #1044

Merged
merged 14 commits into from
Jun 14, 2022

Conversation

PhilippeLafreniere18
Copy link
Contributor

@PhilippeLafreniere18 PhilippeLafreniere18 commented Apr 25, 2022

…t / add autocomplete ogc-filter form

Please check if the PR fulfills these requirements

What is the current behavior? (You can also link to an open issue here)
Domain of value can't be used to fill ogc-filter form.
Autocomplete form is not defined for ogc-filter

Link to : infra-geo-ouverte/igo2#763 and infra-geo-ouverte/igo2#761

What is the new behavior?
You can define a domain (config) to fill in ogc-filter select and autocomplete type
Autocomplete type form can be used to fill domain of values (useful when you have a lot of possibilities)

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Other information:
DOM can be url http call (with column id and value) or an array of option (id/value)

@PhilippeLafreniere18 PhilippeLafreniere18 marked this pull request as draft April 25, 2022 14:33
export interface DOMOptions {
name: string;
url?: string;
value?: DOMValue[];
Copy link
Member

Choose a reason for hiding this comment

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

You should use values instead.

for (const domSelector of bundle.domSelectors) {
let filterDOM;
for (const domOptions of this.configService.getConfig('dom')) {
if (domSelector.name === domOptions.name) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe try a match based on a ID instead of the name.. or a combinaison of both.

@pelord pelord merged commit 5b52199 into next Jun 14, 2022
@pelord pelord deleted the ogcFiltersDOM branch June 14, 2022 13:47
cbourget pushed a commit that referenced this pull request Mar 21, 2023
#1044)

* feat(ogc-filter/dom): allow domain of values to fill ogc-filter select / add autocomplete ogc-filter form

* lint

* fix(ogcfilter): fix domSelectors loop

* fix(ogc-filter): fix button count and reset filter

* fix/refactor(ogc-filters): fix deprecated warning with ngModel/fix reset filter with select

* fix(ogc-filters): fix resetFilter on select domSelector

* fix(ogc): fix reset select filter

* lint

* refactor(ogc-filters): association du dom par id

* rename variable

* rename variables

* ui(ogc-filter): make form untouched on clear
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.

2 participants