Fixed #2868 - Tooltip: escape, disabled and fitContent properties should not accept string as a value

pull/2873/head
Tuğçe Küçükoğlu 2022-08-22 14:35:38 +03:00
parent 0d50a4bd21
commit 0aa2095b45
1 changed files with 8 additions and 6 deletions

View File

@ -302,11 +302,12 @@ const Tooltip = {
else if (typeof options.value === 'object' && options.value) {
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
else {
/* eslint-disable */
target.$_ptooltipValue = options.value.value;
target.$_ptooltipDisabled = options.value.disabled || false;
target.$_ptooltipEscape = options.value.escape || false;
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
target.$_ptooltipClass = options.value.class;
target.$_ptooltipFitContent = options.value.fitContent || true;
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
}
}
@ -339,11 +340,12 @@ const Tooltip = {
else if (typeof options.value === 'object' && options.value) {
if (options.value.value === undefined || options.value.value === null || options.value.value.trim() === '') return;
else {
/* eslint-disable */
target.$_ptooltipValue = options.value.value;
target.$_ptooltipDisabled = options.value.disabled || false;
target.$_ptooltipEscape = options.value.escape || false;
target.$_ptooltipDisabled = !!options.value.disabled === options.value.disabled ? options.value.disabled : false;
target.$_ptooltipEscape = !!options.value.escape === options.value.escape ? options.value.escape : false;
target.$_ptooltipClass = options.value.class;
target.$_ptooltipFitContent = options.value.fitContent || true;
target.$_ptooltipFitContent = !!options.value.fitContent === options.value.fitContent ? options.value.fitContent : true;
}
}
}