Skip to content

POC: create custom tab #1492

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

Closed
wants to merge 1 commit into from
Closed

POC: create custom tab #1492

wants to merge 1 commit into from

Conversation

fifoosid
Copy link
Contributor

No description provided.

Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an option we could explore further, but not by passing HTML in a string, which is a security problem generally, but rather by passing an HTML Template tag as a new slot.

So imagine tabs having 2 slots: content (as it is now) and template:

<ui5-tab icon="sap-icon://employee"> <ui5-button>Button 3</ui5-button> <template slot="template"> <div>...</div> </template> </ui5-tab>

And then use the content of the template to render.

The problem I see with this solution is that you have to pass the template to each tab separately.
I think it would be easiest to create a CustomTab component which extends the Tab and has a static method to pass the template

class HeaderTab extends CustomTab => and then a static call:
HeaderTab.setTemplate(HTML template here)

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 this pull request may close these issues.

2 participants