react-autocomplete icon indicating copy to clipboard operation
react-autocomplete copied to clipboard

The autocomplete menu is positioned wrongly when the container has a transform css rule

Open elvinfucom opened this issue 7 years ago • 3 comments

I put autocomplete component in a react modal, which is centered by transform css rule: transform: translate(-50%, -50%);

Then autocomplete menu displays at wrong position without consider the transform. Anyone knows about this?

elvinfucom avatar Mar 27 '18 11:03 elvinfucom

Hey @elvinfucom , did you figure this out?

I noticed the menu gets a position: fixed style based on its current position, which also makes it hard to align it to the right.

markmssd avatar Apr 03 '18 04:04 markmssd

@markmssd yes, I made a workaround finally. Instead of fixing the autocomplete menu, I fixed the react modal by overwrite transform to disable it. Then the menu works well.

elvinfucom avatar Apr 03 '18 04:04 elvinfucom

I fixed this by replacing transform in the parent div / container with another centering method

Natedeploys avatar Sep 17 '18 08:09 Natedeploys