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

WebPartTitle: Add the ability to render a custom control #228

Closed
estruyf opened this issue Jan 31, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@estruyf
Copy link
Collaborator

commented Jan 31, 2019

Category

[x] Enhancement
[ ] Bug
[ ] Question

Version

Please specify what version of the library you are using: [latest]

Expected / Desired Behavior / Question

Add the ability to render a custom control next to the title. This allows developers to easily create links like the default see all link, but can also be used to add more than that.

@estruyf estruyf added the enhancement label Jan 31, 2019

@jonathanhotono

This comment has been minimized.

Copy link

commented Feb 6, 2019

I really need this kind of feature to display the "See all" link as customers are starting to ask us to made this as well. But things to consider here:

  1. If webpart title is empty, we still need to display the custom control
  2. If webpart is on classic page?
@hugoabernier

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2019

@estruyf and @jonathanhotono: I just submitted a PR that does a slight variation on this.

I added the ability to pass children in the moreLink prop, which will allow developers to easily add custom components in the right-side of the title -- thus giving you the "See all".

The web part title will render if a title is provided or if a moreLink is provided.

I did not provide custom rendering logic for the web part title itself as I figured that if someone wants to completely render a custom web part title, they can probably do so easier within their own web part than through the web part title control.

I'd be happy to revise my approach if you prefer :-)

@estruyf

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 24, 2019

I will test it out @hugoabernier. Think it already gives enough flexibility to the developer. Thanks!

@estruyf

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 28, 2019

This will be part of the 1.13.0 release. You can already test out the functionality by installing the latest beta: https://sharepoint.github.io/sp-dev-fx-controls-react/beta/

@estruyf estruyf added this to the 1.13.0 milestone Mar 28, 2019

@estruyf

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 24, 2019

The new version is now building and will be released in a couple of minutes.

@estruyf estruyf closed this Apr 24, 2019

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