Skip to content

insert component between weekly DIV's #1323

Answered by tjfred35
trig79 asked this question in Support
Discussion options

You must be logged in to vote

You can do it with the v8 version like this:

  const [selected, setSelected] = React.useState<Date>();

  const CustomRow = (props: RowProps) => {
    return (
      <>
        <Row {...props} />
        {selected && props.weekNumber === getWeek(selected) && (
          <tr>
            <td colSpan={7}>
              <div
                style={{
                  padding: "16px 8px",
                  display: "flex",
                  justifyContent: "center",
                  margin: "4px 2px",
                  border: "1px solid blue",
                  borderRadius: "4px"
                }}
              >
                You selected me!
              </div>
            </td>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@trig79
Comment options

@tjfred35
Comment options

Answer selected by gpbl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants