3 ms·
Was there some reason that Ant inherently require it working that way, as opposed to it being a mistake in the application code?
by ajkjk 2y ago
Was there some reason that Ant inherently require it working that way, as opposed to it being a mistake in the application code?
- hombre_fatal 2y agoIt's more general to spawn a portal per component because then you can show multiple popovers at a time, like popovers that are always visible or only go away if you click "Close". So it makes sense to start there for the naive solution.
- danielvaughn 2y agoYeah I suspect it was probably for this reason, but to answer the parent comment, yes it was required in the sense that it's simply how the Ant Design popover component works (or at least that's how it worked in 2021 which is when I did this).
- ajkjk 2y agoRight but the dots aren't popovers. The dots trigger popovers. You should have one dot per dot and one popover per popover. You could certainly make a popover per dot in any react library. It would just be bad to do so.