mirror of https://github.com/apache/superset.git
fix(dashboard): use textContent to render hidden title (#26189)
This commit is contained in:
parent
b4a35e624b
commit
88fb342887
|
@ -113,10 +113,7 @@ export const DynamicEditableTitle = ({
|
|||
// then we can measure the width of that span to resize the input element
|
||||
useLayoutEffect(() => {
|
||||
if (sizerRef?.current) {
|
||||
sizerRef.current.innerHTML = (currentTitle || placeholder).replace(
|
||||
/\s/g,
|
||||
' ',
|
||||
);
|
||||
sizerRef.current.textContent = currentTitle || placeholder;
|
||||
}
|
||||
}, [currentTitle, placeholder, sizerRef]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue