default position in my case - place: "right", offset: {top: -80, right: -40}
looks like:

but when tooltip doesn't have enough space, he just reposition on top of target element:
(target element is under the tooltip)
so offset is still {top: -80, right: -40}, but place: "top"
how can i position tooltip on the right of target element if not enough space for tooltip?
I had a similar issue and have not found a solution yet. This isn't really a bug just a missing potential feature. This feature should allow offset objects for each position. Example:
offsets={{
top: {
x: '-10px',
y: '10px',
},
bottom: {
y: '10px'
},
right: {
x: '100px',
y: '5px',
}
}}
This is similar to what is implemented now except that instead of having a single offset object that applies to all positions, there would be one offset object per position. The reason I suggest here to use x and y is that it's more natural for CSS purposes since these positions are all relative to the top, left corner of the element anyways.
@wwayne any thoughts on this? It would be greatly beneficial for these edge cases where we build components that may or may not be placed on the edges of screens.
EDIT: I see there is already a PR that kinda does this already though not entirely.
Most helpful comment
I had a similar issue and have not found a solution yet. This isn't really a bug just a missing potential feature. This feature should allow offset objects for each position. Example:
This is similar to what is implemented now except that instead of having a single offset object that applies to all positions, there would be one offset object per position. The reason I suggest here to use
xandyis that it's more natural for CSS purposes since these positions are all relative to the top, left corner of the element anyways.@wwayne any thoughts on this? It would be greatly beneficial for these edge cases where we build components that may or may not be placed on the edges of screens.
EDIT: I see there is already a PR that kinda does this already though not entirely.