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

SecurityTrimmedControl remove the wrapping div element that is being returned #325

Closed
ckruszynsky opened this issue Jun 24, 2019 · 5 comments

Comments

@ckruszynsky
Copy link

commented Jun 24, 2019

Category

[ X ] Enhancement

[ ] Bug

[ ] Question

Version

1.13.2

Expected / Desired Behavior / Question

Please either remove the wrapping div element on the render of the secruityTrimmedControl or provide a prop that either accepts styles or a class. If you are building a Flex grid the wrapping div element will break the layout and rendering of the contained elements.

@msftbot

This comment has been minimized.

Copy link

commented Jun 24, 2019

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@estruyf

This comment has been minimized.

Copy link
Collaborator

commented Jul 9, 2019

This is related to React which always requires to return one parent element. In React 16 you have fragments that can solve this issue, but as we are currently working with SPFx 1.3.0, it needed to be implemented as a div.

Adding a className property could indeed be a quick solution to solve this. Once we update the project to 1.8.2 or later (new major release), we can change this to work with React fragments.

@estruyf

This comment has been minimized.

Copy link
Collaborator

commented Jul 9, 2019

This has been implemented and can be tested out by installing the latest beta version. More information about installing a beta version can be found here: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@ckruszynsky

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

Awesome, Thank you Elio!

@estruyf

This comment has been minimized.

Copy link
Collaborator

commented Jul 18, 2019

This is now included within the 1.14.0 release

@estruyf estruyf closed this Jul 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.