-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plasma-new-hope): Added prop 'portal' into Dropdown component #1260
Conversation
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-1260/ |
Documentation preview deployed! website:https://plasma.sberdevices.ru/pr/pr-1260/ |
⚡ Component performance testingResult: 🟢 OK |
/** | ||
* Портал для выпадающего списка. Принимает id контейнера или ref. | ||
*/ | ||
portal?: string | React.RefObject<HTMLElement>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а в итоге на тэг нельзя ссылаться? portal='body'
не сработает?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не, только document
@@ -42,6 +42,7 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) => | |||
trigger = 'click', | |||
variant = 'normal', | |||
hasArrow = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а почему проп просто portal ? почему не hasPortal или там usePortal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasPortal - boolean, не то
usePortal - так хук называется
frame - непонятно че за фрейм
portalRef - неплохо, но Popover принимает еще и строку
поэтому я решил оставить просто portal, не вижу в этом проблем
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А господи я решил что это hasPortal,
типа это свойство на случай если ты хочешь конкретно куда указать, а по умолчанию портал есть ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что значит по-умолчанию? Если не прокидывать portal
- то его и не будет, если прокинуть - то будет.
@shuga2704 В документации это свойство должно быть зафиксировано? |
⚡ Component performance testingResult: 🟢 OK |
Dropdown
portal
What/why changed
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @salutejs/caldera-online@0.57.0-canary.1260.9777960646.0 npm install @salutejs/plasma-asdk@0.100.0-canary.1260.9777960646.0 npm install @salutejs/plasma-b2c@1.342.0-canary.1260.9777960646.0 npm install @salutejs/plasma-new-hope@0.97.0-canary.1260.9777960646.0 npm install @salutejs/plasma-web@1.343.0-canary.1260.9777960646.0 npm install @salutejs/sdds-serv@0.70.0-canary.1260.9777960646.0 # or yarn add @salutejs/caldera-online@0.57.0-canary.1260.9777960646.0 yarn add @salutejs/plasma-asdk@0.100.0-canary.1260.9777960646.0 yarn add @salutejs/plasma-b2c@1.342.0-canary.1260.9777960646.0 yarn add @salutejs/plasma-new-hope@0.97.0-canary.1260.9777960646.0 yarn add @salutejs/plasma-web@1.343.0-canary.1260.9777960646.0 yarn add @salutejs/sdds-serv@0.70.0-canary.1260.9777960646.0