Skip to content

Commit 68625cd

Browse files
authored
feat(group): add height and scroll if overflow (#774) [skip ci]
1 parent d28f309 commit 68625cd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/widgets/containers/Group.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { Group as GroupOoui } from "@gisce/ooui";
33
import { Spinner } from "@/widgets/custom/Spinner";
4-
import { FieldSet , useLocale } from "@gisce/react-formiga-components";
4+
import { FieldSet, useLocale } from "@gisce/react-formiga-components";
55
import iconMapper from "@/helpers/iconMapper";
66

77
type Props = {
@@ -15,7 +15,13 @@ function Group(props: Props): React.ReactElement {
1515
const icon: React.ElementType | undefined = iconMapper(ooui.icon || "");
1616
const { t } = useLocale();
1717
return (
18-
<>
18+
<div
19+
style={{
20+
height: ooui.height ? ooui.height + "px" : "100%",
21+
overflowX: "hidden",
22+
overflowY: "auto",
23+
}}
24+
>
1925
{(ooui.label || icon) && showLabel ? (
2026
<FieldSet label={ooui.label} icon={icon}>
2127
<Spinner
@@ -31,7 +37,7 @@ function Group(props: Props): React.ReactElement {
3137
responsiveBehaviour={responsiveBehaviour}
3238
/>
3339
)}
34-
</>
40+
</div>
3541
);
3642
}
3743

0 commit comments

Comments
 (0)