arco-design / arco-design

A comprehensive React UI components library based on Arco Design

Home Page:https://arco.design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Trigger` component support change or add popupContainer's attribute

ZLY201 opened this issue · comments

Basic Info

  • Package Name And Version: @arco-design/web-react@2.57.2
  • Browser: chrome120.0.0.0

What is expected?

Make classname pass to Trigger also pass to popupContainer's

Steps to reproduce

I cannot do anything for this popupContainer: arco-design/components/Trigger/index.tsx#847

getContainer = () => {
    const popupContainer = document.createElement('div');

    popupContainer.style.width = '100%';
    popupContainer.style.position = 'absolute';
    popupContainer.style.top = '0';
    popupContainer.style.left = '0';

    this.popupContainer = popupContainer;
    this.appendToContainer(popupContainer);

    return popupContainer;
};

I want to set some styles to only take effect under a specific class name prefix, such as .myPrefix arco-xxx, but Trigger does not support modifying the style of the outermost element.