Skip to content

Passing custom eventContentComponent to TimeGridScheduler via arrow function causes infinite loop on click and drag #36

@smcfizz

Description

@smcfizz

When dragging on the grid to create a new event using a custom ContentComponent, my application is thrown into an endless loop. All other ways to interact with the grid (i.e. clicking once to create, dragging/expanding an existing event) do not cause this issue. This only occurs when I pass my custom component to the TimeGridScheduler in an arrow function so that I can pass additional props like so:

eventContentComponent={(props) => CustomEventContent(this.props.myCustomProp, props)}

If I pass my custom ContentComponent to the TimeGridScheduler as shown in the demo:

eventContentComponent={CustomEventContent}

I encounter no issues, however I am unable to pass my custom props.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions