Skip to content
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

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

Closed
mikhailChibel opened this issue May 11, 2017 · 10 comments · Fixed by #72
Closed

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

mikhailChibel opened this issue May 11, 2017 · 10 comments · Fixed by #72

Comments

@mikhailChibel
Copy link

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

@benjycui
Copy link
Member

Nope, just use:

<Panel>
  <div id="..."></div>
</Panel>

@benjycui
Copy link
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,

@mikhailChibel
Copy link
Author

mikhailChibel commented May 12, 2017

@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.

@paranoidjk
Copy link
Member

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

@shepherdwind
Copy link
Contributor

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

@paranoidjk
Copy link
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.

@mikhailChibel
Copy link
Author

@benjycui Any hope on resolving this issue anytime soon?

@benjycui
Copy link
Member

benjycui commented Jun 6, 2017

ping @shepherdwind

shepherdwind added a commit that referenced this issue Jun 6, 2017
@shepherdwind
Copy link
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

@shepherdwind
Copy link
Contributor

1.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants