Commit e7ddfff8 authored by nikogu's avatar nikogu

add break-all to Ellipsis tooltip

parent c29f22fe
...@@ -25,7 +25,7 @@ const EllipsisText = ({ text, length, tooltip, ...other }) => { ...@@ -25,7 +25,7 @@ const EllipsisText = ({ text, length, tooltip, ...other }) => {
if (tooltip) { if (tooltip) {
return ( return (
<Tooltip title={text}> <Tooltip overlayStyle={{ wordBreak: 'break-all' }} title={text}>
<span> <span>
{displayText} {displayText}
{tail} {tail}
...@@ -183,7 +183,13 @@ export default class Ellipsis extends Component { ...@@ -183,7 +183,13 @@ export default class Ellipsis extends Component {
return ( return (
<div id={id} className={cls} {...restProps}> <div id={id} className={cls} {...restProps}>
<style>{style}</style> <style>{style}</style>
{tooltip ? <Tooltip title={children}>{children}</Tooltip> : children} {tooltip ? (
<Tooltip overlayStyle={{ wordBreak: 'break-all' }} title={children}>
{children}
</Tooltip>
) : (
children
)}
</div> </div>
); );
} }
...@@ -198,7 +204,13 @@ export default class Ellipsis extends Component { ...@@ -198,7 +204,13 @@ export default class Ellipsis extends Component {
return ( return (
<div {...restProps} ref={this.handleRoot} className={cls}> <div {...restProps} ref={this.handleRoot} className={cls}>
<div ref={this.handleContent}> <div ref={this.handleContent}>
{tooltip ? <Tooltip title={text}>{childNode}</Tooltip> : childNode} {tooltip ? (
<Tooltip overlayStyle={{ wordBreak: 'break-all' }} title={text}>
{childNode}
</Tooltip>
) : (
childNode
)}
<div className={styles.shadow} ref={this.handleShadowChildren}> <div className={styles.shadow} ref={this.handleShadowChildren}>
{children} {children}
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment