Skip to content

timeline always crash #47

Description

@HodayaGruz

Overview

Add general description explaining this issue
i see that in the initial loa of vistimeline you add:

Object.defineProperty(this, 'timeline', {
			value: new VisTimelineCtor(this.#ref.current, this.items, this.groups, this.props.options),
			writable: false
		});

and in vis-timeline the groups is replace by the options since the groups is object:

 if (!(Array.isArray(groups) || isDataViewLike(groups)) && groups instanceof Object) {
      const forthArgument = options;
      options = groups;
      groups = forthArgument;
    }

(https://github.com/visjs/vis-timeline/blob/master/lib/timeline/Timeline.js)

Package versions

"react-vis-timeline": "^2.0.3",
"vis-data": "^7.1.4",
"vis-timeline": "^7.4.2",
"web-vitals": "^2.1.4",
"xss": "^1.0.11"

Steps to reproduce

Add step by step guide to reproduce issue

  1. Step 1
  2. Step 2

Code Snippet

  <Timeline
                ref={ref}
                key={uuid()}
                initialGroups={groups || []}
                initialItems={items}
                options={{
                    rtl: true,
                    orientation: "top",
                    verticalScroll: true,
                    zoomKey: "ctrlKey",
                    maxHeight: 500,
                    start: moment().format(),
                    groupEditable: true,
                    end: moment().add(5, "day").format(),
                    zoomMax: 31536000,
                }}
            />

Related issues

Any issue which is related to this issue

  • e.g. issue 123

Screenshots (if appropriate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions