-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tooltipAccessor prop to calendar to disable tooltip if needed #701
Conversation
src/DayColumn.js
Outdated
title: | ||
(typeof label === 'string' ? label + ': ' : '') + tooltip, | ||
} | ||
: {})} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make this a bit less ugly please :P i'd just set title to undefined
in the one case that will be fine
src/EventCell.js
Outdated
@@ -75,7 +78,7 @@ class EventCell extends React.Component { | |||
onClick={e => onSelect(event, e)} | |||
onDoubleClick={e => onDoubleClick(event, e)} | |||
> | |||
<div className="rbc-event-content" title={title}> | |||
<div className="rbc-event-content" {...tooltip ? { title: tooltip } : {}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here
thanks! |
Hey, can you please let me know the ETA... |
Can you please tell me how to off the built it Tooltip? I already tried many times but I still failed. Thanks and Sorry, newbie here |
I already added toolTipAccessor but what is my next move? Where can I defined tooltip as undefined or null? |
@RusselFourteen It works like the others accessors. Assign a function who returns NULL to the tooltipAccessor and it will be removed. |
Use a "tooltipAccessor" prop for the tooltip instead of the "titleAccessor" prop. Can show a tooltip different from the title, or not display it at all if the accessor returns null.
Fixes #226, #470