Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Fix drop shadow for filters and backdrop filters (#5437)

Oleg Isonen2f1fb253b20f
diff --git a/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx b/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx
index 2fdbd6042a..25b1f5eea7 100644
--- a/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx
+++ b/apps/builder/app/builder/features/style-panel/shared/filter-content.tsx
@@ -109,20 +109,23 @@ export const FilterSectionContent = ({
>(undefined);
useEffect(() => {
- if (
- layer.type !== "function" ||
- isFilterFunction(layer.name) === false ||
- layer.args.type !== "tuple"
- ) {
+ if (layer.type !== "function" || isFilterFunction(layer.name) === false) {
+ return;
+ }
+ if (layer.args.type !== "tuple" && layer.args.type !== "shadow") {
return;
}
-
setFilterFunction(layer.name);
- setFilterFunctionValue(layer.args.value[0]);
setIntermediateValue({
type: "intermediate",
value: propertyValue,
});
+ if (layer.args.type === "tuple") {
+ setFilterFunctionValue(layer.args.value[0]);
+ }
+ if (layer.args.type === "shadow") {
+ setFilterFunctionValue(layer.args);
+ }
}, [layer, propertyValue]);
const handleFilterFunctionChange = (filterName: FilterFunction) => {