WebPartTitle: Add the ability to render a custom control
See original GitHub issueCategory
[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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
WebPartTitle: Add the ability to render a custom control #228
Add the ability to render a custom control next to the title. This allows developers to easily create links like the default see...
Read more >WebPartTitle - @pnp/spfx-controls-react
This control renders a web part title that is changeable when the page is in edit ... Add the title , displayMode ,...
Read more >PnP Web Part Title Control In SharePoint Framework
This control renders a web part title that is changeable when the page is in edit mode. See that all links also can...
Read more >(3) Add a Title to your Web Part just like Out of the Box (SPFx)
Put the WebPartTitle control right under your styles.container that way it is attached to the div container class.
Read more >Build custom controls for the property pane | Microsoft Learn
Use the asynchronous dropdown property pane control to render the listName web part property · Reference required types. · After that code, add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The new version is now building and will be released in a couple of minutes.
@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 😃