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

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.

@ghost
Copy link

ghost commented Jun 24, 2019

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

@ghost ghost added the Needs: Triage 🔍 label Jun 24, 2019
@estruyf
Copy link
Member

estruyf 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
Copy link
Member

estruyf 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
Copy link
Author

Awesome, Thank you Elio!

@estruyf
Copy link
Member

estruyf commented Jul 18, 2019

This is now included within the 1.14.0 release

@estruyf estruyf closed this as completed Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants