ProSchedulerSign in

Timeline · Configuring the view

Equal row heights

rowHeight: "equal" makes every row as tall as the busiest one, for an even grid.

Live demo

Toggle equal heights

Fullscreen
import { useState } from "react"
import { ProScheduler } from "@andreisaac/pro-scheduler"
import { studioEvents, studioResources } from "./data/studio"
import { Choice, Toolbar, useEvents } from "./kit"

export function EqualRowsDemo() {
  const { events, handlers } = useEvents(studioEvents)
  const [equal, setEqual] = useState(true)

  return (
    <div className="docs-demo__stack">
      <Toolbar>
        <Choice active={equal} onClick={() => setEqual(!equal)}>
          Equal row heights
        </Choice>
      </Toolbar>
      <ProScheduler
        data={events}
        resources={studioResources}
        view={{ timeline: { type: "week", resolutionHorizontal: "day", rowHeight: equal ? "equal" : "variable" } }}
        styleConfig={{ laneHeight: 26, laneGap: 3 }}
        height={560}
        {...handlers}
      />
    </div>
  )
}

About this demo

rowHeight: "equal" makes every row as tall as the busiest one, for an even grid.

Things to try

  • Toggle equal heights

The props behind it are explained in Views.

Use ProScheduler in your project