-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[SpeedDial] Crash when using custom style in FabProps of SpeedDialAction #18312
Labels
bug 🐛
Something doesn't work
component: speed dial
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
Comments
oliviertassinari
added
bug 🐛
Something doesn't work
good first issue
Great for first contributions. Enable to learn the contribution process.
component: speed dial
This is the name of the generic UI component, not the React module!
labels
Nov 11, 2019
oliviertassinari
changed the title
When used together, TooltipClasses and FabProps are not working for SpeedDialAction in Material UI React
[SpeedDial] Crash when using custom style in FabProps
Nov 11, 2019
@rahuliet Thank you for this bug report. I can confirm the exception. What do you think of this diff? diff --git a/packages/material-ui-lab/src/SpeedDialAction/SpeedDialAction.js b/packages/material-ui-lab/src/SpeedDialAction/SpeedDialAction.js
index 545d82adb..31411da6b 100644
--- a/packages/material-ui-lab/src/SpeedDialAction/SpeedDialAction.js
+++ b/packages/material-ui-lab/src/SpeedDialAction/SpeedDialAction.js
@@ -80,7 +80,7 @@ const SpeedDialAction = React.forwardRef(function SpeedDialAction(props, ref) {
classes,
className,
delay = 0,
- FabProps,
+ FabProps = {},
icon,
id,
open,
@@ -101,21 +101,18 @@ const SpeedDialAction = React.forwardRef(function SpeedDialAction(props, ref) {
setTooltipOpen(true);
};
- const transitionStyle = { transitionDelay: `${delay}ms` };
-
- if (FabProps && FabProps.style) {
- FabProps.style.transitionDelay = `${delay}ms`;
- }
-
const fab = (
<Fab
size="small"
className={clsx(classes.fab, !open && classes.fabClosed, className)}
tabIndex={-1}
role="menuitem"
- style={transitionStyle}
aria-describedby={`${id}-label`}
{...FabProps}
+ style={{
+ transitionDelay: `${delay}ms`,
+ ...FabProps.style,
+ }}
>
{icon}
</Fab> Do you want to submit a pull request? :) |
1 task
This is fixed now in alpha32 release..thanks :) |
rahuliet
changed the title
[SpeedDial] Crash when using custom style in FabProps
[SpeedDial] Crash when using custom style in FabProps of SpeedDialAction
Nov 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug 🐛
Something doesn't work
component: speed dial
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
While working on SpeedDial component of React's Material UI the following is needed:
All this was done successfully earlier with the following dependencies at sandbox URL for working code
But now with latest packages I have updated code posted here sandbox URL for semi working code where things are getting bumpy
when hovered over speeddialaction there is an error that causes the SpeedDial to disappear. Error details can be seen in the console of sandbox URL for semi working code
The text was updated successfully, but these errors were encountered: