Merge pull request #2585 from tugcekucukoglu/fitContent
Fixed #2536 - Tooltip new fitContent propertypull/2587/head
commit
dd9d3c85e9
|
@ -120,6 +120,10 @@ function create(el) {
|
|||
|
||||
container.style.display = 'inline-block';
|
||||
|
||||
if (el.$_ptooltipFitContent) {
|
||||
container.style.width = 'fit-content';
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
|
@ -293,12 +297,14 @@ const Tooltip = {
|
|||
target.$_ptooltipDisabled = false;
|
||||
target.$_ptooltipEscape = false;
|
||||
target.$_ptooltipClass = null;
|
||||
target.$_ptooltipFitContent = true;
|
||||
}
|
||||
else {
|
||||
target.$_ptooltipValue = options.value.value;
|
||||
target.$_ptooltipDisabled = options.value.disabled || false;
|
||||
target.$_ptooltipEscape = options.value.escape || false;
|
||||
target.$_ptooltipClass = options.value.class;
|
||||
target.$_ptooltipFitContent = options.value.fitContent || true;
|
||||
}
|
||||
|
||||
target.$_ptooltipZIndex = options.instance.$primevue && options.instance.$primevue.config && options.instance.$primevue.config.zIndex.tooltip;
|
||||
|
|
|
@ -97,6 +97,12 @@ directives: {
|
|||
<td>true</td>
|
||||
<td>By default the tooltip contents are rendered as text. Set to true to support html tags in the content.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fitContent</td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td>Automatically adjusts the element position when there is not enough space on the selected position.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue