primevue
primevue copied to clipboard
SelectButton: tooltips
Describe the feature you would like to see added
I want to be able to add tooltips on each single button within the component. The tooltip should be attached to the wrapping .p-button.
Currently the only way to add tooltip is to add it within the template of the content.
The problem with that is: If you add the tooltip within the template, you have the tooltip only on the inner rectangle.
The button has a huge padding around the content, that does not have the tooltip.
Is your feature request related to a problem?
No response
Describe the solution you'd like
Would like to have a component property, for tooltips. eg. 'optionTooltip' = Property name or getter function to use as the value of the tooltip. 'optionTooltipDirection' = Property name or getter function for the direction of the displayed tooltip (top, bottom, left, right)
<SelectButton
:options="buttons"
optionTooltip="tooltip"
></SelectButton>
data:
buttons: [
{
id: 1,
icon: "pi pi-list",
tooltip: "first button tooltip",
},
{
id: 2,
icon: "pi pi-box",
tooltip: "second button tooltip",
},
],
Describe alternatives you have considered
No response
Additional context
reopened issue #2252
Would probaby make sense to have the same for button-classes and style, too.
Here's an example use case:
- each button has a specific color (custom class needed)
- each button needs a tooltip
See #4286