Skip to content

Allow to set 'id' attribute to the panel #69

Closed

Description

@mikhailChibel

Is there any way to set id attribute to the panel?

Activity

  1. benjycui commented on May 12, 2017

    @benjycui
    Member

    Nope, just use:

    <Panel>
      <div id="..."></div>
    </Panel>
  2. benjycui commented on May 12, 2017

    @benjycui
    Member

    @shepherdwind I am not sure if we can pass rest props to panel?

    collapse/src/Panel.jsx

    Lines 14 to 22 in f6ea09b

    className,
    style,
    prefixCls,
    header,
    headerClass,
    children,
    isActive,
    showArrow,
    destroyInactivePanel,

  3. mikhailChibel commented on May 12, 2017

    @mikhailChibel
    Author

    @benjycui sure I can set id on the content of the panel. I would be nice to have an id of the panel itself, as it can simplify, for example, UI tests.

  4. paranoidjk commented on May 12, 2017

    @paranoidjk
    Member

    nope. There should never be a id api,but we may consider pass down rest props

  5. shepherdwind commented on May 12, 2017

    @shepherdwind
    Contributor

    Rest props pass to panel is ok. But, I think that React will throw error when pass an unknown prop to panel.

  6. paranoidjk commented on May 12, 2017

    @paranoidjk
    Member

    Rest props pass to panel is ok. But, I think that React will throw error when pass an unknown prop to panel.

    IMO, This is not our concern, we just need to make sure all api which shown in doc are handled, then rest props should be all html valiad.

  7. mikhailChibel commented on Jun 6, 2017

    @mikhailChibel
    Author

    @benjycui Any hope on resolving this issue anytime soon?

  8. benjycui commented on Jun 6, 2017

    @benjycui
    Member
  9. added a commit that references this issue on Jun 6, 2017
    5f98306
  10. shepherdwind commented on Jun 6, 2017

    @shepherdwind
    Contributor

    Pass rest props to panel div will give it too much useless prop.

    So, The only way is to add a prop id , see mr #72

  11. shepherdwind commented on Jun 19, 2017

    @shepherdwind
    Contributor

    1.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions