mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-23 11:04:52 +02:00
Use popper placement for tooltip arrow
This commit is contained in:
parent
5c2cb4de80
commit
949d764638
@ -94,6 +94,8 @@ class Tooltip extends Component {
|
||||
<Portal>
|
||||
<Popper
|
||||
placement={position}
|
||||
// Disable events to improve performance when many tooltips
|
||||
// are shown (Quality Definitions for example).
|
||||
eventsEnabled={false}
|
||||
modifiers={{
|
||||
preventOverflow: {
|
||||
@ -103,7 +105,7 @@ class Tooltip extends Component {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{({ ref, style, scheduleUpdate }) => {
|
||||
{({ ref, style, placement, scheduleUpdate }) => {
|
||||
this._scheduleUpdate = scheduleUpdate;
|
||||
|
||||
return (
|
||||
@ -126,7 +128,7 @@ class Tooltip extends Component {
|
||||
className={classNames(
|
||||
styles.arrow,
|
||||
styles[kind],
|
||||
styles[position]
|
||||
styles[placement.split('-')[0]]
|
||||
)}
|
||||
/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user