-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: setCurrentFilters function (#1338)
* fix: setCurrentFilters function * chore: improve typing to get values from the schema * chore: improve typings to support proper filter values --------- Co-authored-by: patzick <13100280+patzick@users.noreply.github.com>
- Loading branch information
1 parent
7e450da
commit 75df238
Showing
3 changed files
with
70 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
"@shopware-pwa/composables-next": minor | ||
--- | ||
|
||
# Fix setCurrentFilters | ||
|
||
Body **before** when you use setCurrentFilters: | ||
|
||
``` | ||
{ | ||
"limit":10, | ||
"search":"", | ||
"p":"1", | ||
"navigationId":"018db20234207be8948e3a4b46501435", | ||
"manufacturer":"", | ||
"price": {"min":0,"max":0}, | ||
"rating": null, | ||
"shipping-free":false, | ||
"properties":"", | ||
"code":"manufacturer", // 👈 Not like this | ||
"value":"018d35f5b5757076adea38044bb96937" // 👈 Not like this | ||
} | ||
``` | ||
|
||
Body **after** the code changes with fixed setCurrentFilters: | ||
|
||
``` | ||
{ | ||
"limit":10, | ||
"search":"", | ||
"p":"1", | ||
"navigationId":"018db20234207be8948e3a4b46501435", | ||
"manufacturer":"018d35f5b5757076adea38044bb96937", // 👈 where the filter value should go | ||
"price": {"min":0,"max":0}, | ||
"rating": null, | ||
"shipping-free":false, | ||
"properties":"", | ||
} | ||
``` |
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