Open tooltip on hover, show scroll on overflow y
This commit is contained in:
parent
19c013378d
commit
15db9e9c1d
|
@ -6,6 +6,8 @@
|
||||||
pointer-events: auto !important;
|
pointer-events: auto !important;
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
z-index: 102;
|
z-index: 102;
|
||||||
|
overflow-y: scroll;
|
||||||
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.white-space--nowrap {
|
.white-space--nowrap {
|
||||||
|
@ -65,10 +67,6 @@
|
||||||
.grid .key-colon, .grid .title--border {
|
.grid .key-colon, .grid .title--border {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip__container {
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid .key-colon:nth-child(odd)::after {
|
.grid .key-colon:nth-child(odd)::after {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { Trans } from 'react-i18next';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import './Tooltip.css';
|
import './Tooltip.css';
|
||||||
import 'react-popper-tooltip/dist/styles.css';
|
import 'react-popper-tooltip/dist/styles.css';
|
||||||
|
import { HIDE_TOOLTIP_DELAY } from '../../../helpers/constants';
|
||||||
|
|
||||||
const getHintElement = ({
|
const getHintElement = ({
|
||||||
className,
|
className,
|
||||||
|
@ -22,7 +23,7 @@ const getHintElement = ({
|
||||||
<Trans>{item || '—'}</Trans>
|
<Trans>{item || '—'}</Trans>
|
||||||
</div>,
|
</div>,
|
||||||
),
|
),
|
||||||
}) => <TooltipTrigger placement={placement} trigger="click" tooltip={
|
}) => <TooltipTrigger placement={placement} trigger="hover" delayHide={HIDE_TOOLTIP_DELAY} tooltip={
|
||||||
({
|
({
|
||||||
tooltipRef,
|
tooltipRef,
|
||||||
getTooltipProps,
|
getTooltipProps,
|
||||||
|
@ -54,7 +55,6 @@ getHintElement.propTypes = {
|
||||||
placement: PropTypes.string,
|
placement: PropTypes.string,
|
||||||
canShowTooltip: PropTypes.string,
|
canShowTooltip: PropTypes.string,
|
||||||
xlinkHref: PropTypes.string,
|
xlinkHref: PropTypes.string,
|
||||||
scrollHide: PropTypes.bool,
|
|
||||||
content: PropTypes.oneOfType([
|
content: PropTypes.oneOfType([
|
||||||
PropTypes.string,
|
PropTypes.string,
|
||||||
PropTypes.array,
|
PropTypes.array,
|
||||||
|
|
|
@ -57,6 +57,7 @@ export const DEBOUNCE_FILTER_TIMEOUT = 500;
|
||||||
export const CHECK_TIMEOUT = 1000;
|
export const CHECK_TIMEOUT = 1000;
|
||||||
export const SUCCESS_TOAST_TIMEOUT = 5000;
|
export const SUCCESS_TOAST_TIMEOUT = 5000;
|
||||||
export const FAILURE_TOAST_TIMEOUT = 30000;
|
export const FAILURE_TOAST_TIMEOUT = 30000;
|
||||||
|
export const HIDE_TOOLTIP_DELAY = 300;
|
||||||
|
|
||||||
export const UNSAFE_PORTS = [
|
export const UNSAFE_PORTS = [
|
||||||
1,
|
1,
|
||||||
|
|
Loading…
Reference in New Issue