Skip to content

Commit

Permalink
Merge pull request #554 from Pinelab-studio/feat/testing-facets
Browse files Browse the repository at this point in the history
feat(facet-suggestions): admin ui fix
  • Loading branch information
martijnvdbrug authored Dec 20, 2024
2 parents 5501c83 + 696dea8 commit cfdcb87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/vendure-plugin-facet-suggestions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.2 (2024-12-20)

- Fix to correctly save assets with Vendure V3.1

# 1.1.1 (2024-08-04)

- Update compatibility range (#480)
Expand Down
2 changes: 1 addition & 1 deletion packages/vendure-plugin-facet-suggestions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pinelab/vendure-plugin-facet-suggestions",
"version": "1.1.1",
"version": "1.1.2",
"description": "A vendure plugin that allows you to define suggested facets for all products, or suggested facets based on other facets.",
"author": "Surafel Tariku <[email protected]>",
"homepage": "https://pinelab-plugins.com/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,19 @@ export class SuggestedFacetsComponent implements CustomDetailComponent, OnInit {
facetValueIds: unique([...currentFacetValueIds, facetValue.id]),
});
productGroup.markAsDirty();
productGroup.controls.facetValueIds.markAsDirty();
}

removeFacetValue(facetValue: FacetValue) {
const productGroup = this.getProductFormGroup();
const currentFacetValueIds: string[] = productGroup.value.facetValueIds;
console.log('productGroup', facetValue);
productGroup.patchValue({
facetValueIds: unique([
...currentFacetValueIds.filter((id) => id !== facetValue.id),
]),
});
productGroup.markAsDirty();
productGroup.controls.facetValueIds.markAsDirty();
}

private getProductFormGroup(): FormGroup {
Expand Down

0 comments on commit cfdcb87

Please sign in to comment.