-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Can't use FloutingUI autoPlacement #2583
Comments
@patrikholcak 'auto' isn't an option for position, we just use the as noted by FUI
Sounds like what is asked by @sirmspencer is an option to have 'auto' and then use |
Right, so should I open another issue for my problem? I can’t upgrade because of this. 😞 |
I think so. Its been 6 months so id have to look a little deeper again. |
@patrikholcak @sirmspencer we'd be happy to also take a PR to prioritize this if you're up for it? |
It seems like you both had a good handle on what you wanted and where to insert it into the library, so a PR would be great if you have the time! |
@sirmspencer @patrikholcak we changed the ordering of the merging for the floatingUIOptions. Could you please see if things work better for you now? |
👋 I just opened a PR for |
I'll take a look, thanks! |
Closed by #3009 |
Shepherd adds flip and shift to default options, then does a deep merge with any other options passed in. Flip and autoPlacement are not compatible so adding autoPlacement to floatingUIOptions.middleware just causes errors.
I tried not passing in a placement so shouldCenter is true, but there are side effects in other parts of the code that block floating UI all together.
You could check for something like
:on "auto"
to skip adding flip. autoPlacement doesn't need a placement so you can skipoptions.placement = attachToOptions.on;
too.https://github.com/shepherd-pro/shepherd/blob/master/src/js/utils/floating-ui.js#L169
The text was updated successfully, but these errors were encountered: