rsuite/rsuite

Calendar: Pass in rest of props to renderCell

dkang23 opened this issue · 3 comments

What problem does this feature solve?

Adds more customization to each cell of calender.

I'm trying to add my own tooltip to each calendar cell, but I am faced with the button title also showing

What does the proposed API look like?

Hi @dkang23 , I don't understand why you need to pass props to renderCell. Can you explain it with a specific example?

my renderCell function is returning a cell with a custom tooltip, but the default tooltip (Button.title?) is also showing


const renderCell = (date, ...rest) => {
    const list = getTodoList(date);

    if (list.length) {
      return (
        <Tooltip...

my renderCell function is returning a cell with a custom tooltip, but the default tooltip (Button.title?) is also showing

Currently renderCell is rendered inside the cell and cannot reset the title. If you want to meet your application scenario, it may be a breaking change to renderCell. We will consider how to handle this issue.