Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Collapsible] Make parameters in useCollapsilbe* hooks mandatory #752

Closed
wants to merge 15 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const CollapsibleContent = React.forwardRef(function CollapsibleContent(
props: CollapsibleContent.Props,
forwardedRef: React.ForwardedRef<HTMLButtonElement>,
) {
const { className, htmlHidden, render, ...otherProps } = props;
const { className, htmlHidden = 'hidden', render, ...otherProps } = props;

const { animated, mounted, open, contentId, setContentId, setMounted, setOpen, ownerState } =
useCollapsibleContext();
Expand Down
6 changes: 3 additions & 3 deletions packages/mui-base/src/Collapsible/Root/CollapsibleRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const CollapsibleRoot = React.forwardRef(function CollapsibleRoot(
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
const {
animated,
animated = true,
Copy link
Contributor Author

@sai6855 sai6855 Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added deafult props in component,to make it consistent with other components.

children,
className,
defaultOpen,
disabled,
defaultOpen = true,
disabled = false,
onOpenChange,
open,
render: renderProp,
Expand Down
Loading