rsuite icon indicating copy to clipboard operation
rsuite copied to clipboard

Calendar: Pass in rest of props to renderCell

Open dkang23 opened this issue 2 years ago • 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?

dkang23 avatar Mar 14 '24 10:03 dkang23

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

simonguo avatar Mar 14 '24 10:03 simonguo

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...

dkang23 avatar Mar 16 '24 07:03 dkang23

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.

simonguo avatar Mar 19 '24 07:03 simonguo