[MM-56608] Upgrade to "@floating-ui/react" for post_priority/post_priority_picker_overlay component (#25980)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
686b22a076
Коммит
2d7a14244f
@@ -13,7 +13,7 @@ import {
|
|||||||
useRole,
|
useRole,
|
||||||
flip,
|
flip,
|
||||||
shift,
|
shift,
|
||||||
} from '@floating-ui/react-dom-interactions';
|
} from '@floating-ui/react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React, {memo, useCallback, useState} from 'react';
|
import React, {memo, useCallback, useState} from 'react';
|
||||||
import {useIntl} from 'react-intl';
|
import {useIntl} from 'react-intl';
|
||||||
@@ -60,10 +60,12 @@ function PostPriorityPickerOverlay({
|
|||||||
const {
|
const {
|
||||||
x: pickerX,
|
x: pickerX,
|
||||||
y: pickerY,
|
y: pickerY,
|
||||||
reference: pickerRef,
|
|
||||||
floating: pickerFloating,
|
|
||||||
strategy: pickerStrategy,
|
strategy: pickerStrategy,
|
||||||
context: pickerContext,
|
context: pickerContext,
|
||||||
|
refs: {
|
||||||
|
setReference: setPickerReference,
|
||||||
|
setFloating: setPickerFloating,
|
||||||
|
},
|
||||||
} = useFloating({
|
} = useFloating({
|
||||||
open: pickerOpen,
|
open: pickerOpen,
|
||||||
onOpenChange: setPickerOpen,
|
onOpenChange: setPickerOpen,
|
||||||
@@ -97,7 +99,7 @@ function PostPriorityPickerOverlay({
|
|||||||
>
|
>
|
||||||
<IconContainer
|
<IconContainer
|
||||||
id='messagePriority'
|
id='messagePriority'
|
||||||
ref={pickerRef}
|
ref={setPickerReference}
|
||||||
className={classNames({control: true, active: pickerOpen})}
|
className={classNames({control: true, active: pickerOpen})}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type='button'
|
type='button'
|
||||||
@@ -119,7 +121,7 @@ function PostPriorityPickerOverlay({
|
|||||||
initialFocus={-1}
|
initialFocus={-1}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref={pickerFloating}
|
ref={setPickerFloating}
|
||||||
style={{
|
style={{
|
||||||
width: 'max-content',
|
width: 'max-content',
|
||||||
position: pickerStrategy,
|
position: pickerStrategy,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user