-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@dpc-sdp/ripple-tide-search): allow multiple to be set per level
- Loading branch information
David Featherston
committed
Mar 13, 2024
1 parent
6bd00e8
commit 6a5d2a5
Showing
6 changed files
with
285 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
226 changes: 226 additions & 0 deletions
226
examples/nuxt-app/test/fixtures/search-listing/dependent-filters/page-mix.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,226 @@ | ||
{ | ||
"title": "Depenedent filters", | ||
"changed": "2022-11-02T12:47:29+11:00", | ||
"created": "2022-11-02T12:47:29+11:00", | ||
"type": "tide_search_listing", | ||
"nid": "11dede11-10c0-111e1-1100-000000000330", | ||
"showTopicTags": true, | ||
"summary": "", | ||
"config": { | ||
"searchListingConfig": { | ||
"resultsPerPage": 10, | ||
"showFiltersOnLoad": true | ||
}, | ||
"queryConfig": { | ||
"multi_match": { | ||
"query": "{{query}}", | ||
"fields": [ | ||
"title^3", | ||
"field_landing_page_summary^2", | ||
"body", | ||
"field_paragraph_body", | ||
"summary_processed" | ||
] | ||
} | ||
}, | ||
"results": { | ||
"layout": { | ||
"component": "TideSearchResultsList" | ||
}, | ||
"item": { | ||
"grant": { | ||
"component": "TideGrantSearchResult" | ||
} | ||
} | ||
}, | ||
"globalFilters": [ | ||
{ | ||
"terms": { | ||
"type": [ | ||
"grant" | ||
] | ||
} | ||
}, | ||
{ | ||
"terms": { | ||
"field_node_site": [ | ||
8888 | ||
] | ||
} | ||
} | ||
], | ||
"userFilters": [ | ||
{ | ||
"id": "termFilter", | ||
"component": "TideSearchFilterDropdown", | ||
"filter": { | ||
"type": "term", | ||
"value": "termFilter.keyword" | ||
}, | ||
"aggregations": { | ||
"field": "termFilter", | ||
"source": "taxonomy" | ||
}, | ||
"props": { | ||
"id": "termFilter", | ||
"label": "Term filter example", | ||
"placeholder": "Select a colour", | ||
"multiple": true, | ||
"options": [ | ||
{ | ||
"id": "1", | ||
"label": "Red", | ||
"value": "Red" | ||
}, | ||
{ | ||
"id": "2", | ||
"label": "Green", | ||
"value": "Green" | ||
}, | ||
{ | ||
"id": "3", | ||
"label": "Blue", | ||
"value": "Blue" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "termsFilter", | ||
"component": "TideSearchFilterDropdown", | ||
"filter": { | ||
"type": "terms", | ||
"value": "termsFilter.keyword" | ||
}, | ||
"aggregations": { | ||
"field": "termsFilter", | ||
"source": "taxonomy" | ||
}, | ||
"props": { | ||
"id": "termsFilter", | ||
"label": "Terms filter example", | ||
"placeholder": "Select a colour", | ||
"multiple": true, | ||
"options": [ | ||
{ | ||
"id": "1", | ||
"label": "Orange", | ||
"value": "Orange" | ||
}, | ||
{ | ||
"id": "2", | ||
"label": "Purple", | ||
"value": "Purple" | ||
}, | ||
{ | ||
"id": "3", | ||
"label": "Yellow", | ||
"value": "Yellow" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "dependentFilter", | ||
"component": "TideSearchFilterDependent", | ||
"columns": "rpl-grid--inherit", | ||
"filter": { | ||
"type": "dependent", | ||
"multiple": false, | ||
"value": "field_species_name" | ||
}, | ||
"aggregations": { | ||
"field": "species", | ||
"source": "taxonomy" | ||
}, | ||
"props": { | ||
"id": "dependentFilter", | ||
"multiple": false, | ||
"levels": [ | ||
{ | ||
"label": "Terms dependent example", | ||
"placeholder": "Select a species" | ||
}, | ||
{ | ||
"label": "Terms dependent child example", | ||
"placeholder": "Select a sub species" | ||
}, | ||
{ | ||
"label": "Terms dependent grandchild example", | ||
"placeholder": "All sub sub species", | ||
"multiple": true | ||
} | ||
], | ||
"options": [ | ||
{ | ||
"id": 1, | ||
"label": "Mammals", | ||
"value": "Mammals", | ||
"parent": null | ||
}, | ||
{ | ||
"id": 2, | ||
"label": "Dogs", | ||
"value": "Dogs", | ||
"parent": 1 | ||
}, | ||
{ | ||
"id": 3, | ||
"label": "Birds", | ||
"value": "Birds", | ||
"parent": null | ||
}, | ||
{ | ||
"id": 4, | ||
"label": "Cats", | ||
"value": "Cats", | ||
"parent": 1 | ||
}, | ||
{ | ||
"id": 5, | ||
"label": "Parrots", | ||
"value": "Parrots", | ||
"parent": 3 | ||
}, | ||
{ | ||
"id": 6, | ||
"label": "Eagles", | ||
"value": "Eagles", | ||
"parent": 3 | ||
}, | ||
{ | ||
"id": 7, | ||
"label": "Cockatoos", | ||
"value": "Cockatoos", | ||
"parent": 5 | ||
}, | ||
{ | ||
"id": 8, | ||
"label": "Budgerigars", | ||
"value": "Budgerigars", | ||
"parent": 5 | ||
}, | ||
{ | ||
"id": 9, | ||
"label": "Foxes", | ||
"value": "Foxes", | ||
"parent": 1 | ||
}, | ||
{ | ||
"id": 10, | ||
"label": "Beagle", | ||
"value": "Beagle", | ||
"parent": 2 | ||
}, | ||
{ | ||
"id": 11, | ||
"label": "Spaniel", | ||
"value": "Spaniel", | ||
"parent": 2 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters