Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behavior with timeRanges #29

Closed
mschrembs opened this issue Apr 26, 2021 · 7 comments
Closed

strange behavior with timeRanges #29

mschrembs opened this issue Apr 26, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@mschrembs
Copy link

mschrembs commented Apr 26, 2021

Hi,
I pass several timeRanges to the gantt:
image

The gantt first loads the timeRanges:
image

When I change the day, a timeRange is still there, even if it was the day before:
image

I would have expected the timeRanges to only be there on the defined days.

Thank you.

@nitish-darji
Copy link

nitish-darji commented Nov 16, 2021

Hello,

I'm facing same issue when change view and have more than one timeRanges then only first timeRange object updated.

Also I've try gantt.refreshTimeRanges(); but not success.

Just reference below function call internal from lib

     function refreshTimeRanges() {
	timeRangeStore._update(({ ids, entities }) => {
		ids.forEach(id => {
			const timeRange = entities[id];
			const newLeft = columnService.getPositionByDate(timeRange.model.from) | 0;
			const newRight = columnService.getPositionByDate(timeRange.model.to) | 0;
			timeRange.left = newLeft;
			timeRange.width = newRight - newLeft;
		});
		return { ids, entities };
	});
}

Please help me out any workaround.

Thanks in advance.

@ANovokmet
Copy link
Owner

Interesting, I've just tried the demo with multiple time ranges and I did not experience any issues. Any chance you share the rest of your gantt configuration?

@ANovokmet
Copy link
Owner

Were there any errors in the console? I've fixed an error when time ranges get destroyed which could result in a stuck view.

@nitish-darji
Copy link

thanks @ANovokmet for quick reply

I'm working on angular and svelte-gantt@3.0.4-beta version

please check below attached demo link
https://stackblitz.com/edit/angular-fj36mp

after upgrade latest version now it's working as expected (except one issue when build project then one error occur as below)
node_modules/svelte-gantt/types/modules/table/tableHeader.d.ts:1:27

investigate error then found node_modules/svelte-gantt/types/modules/table/tableHeader.d.ts file import { SvelteRow } from "src/core/row"; when I replace with import { SvelteRow } from "../../core/row"; then it's working fine

Again thanks @ANovokmet

@ANovokmet
Copy link
Owner

@nitish-darji thanks for the heads up on this error, I'll be investigating it.

@V-Py V-Py added the bug Something isn't working label May 1, 2022
@V-Py
Copy link
Collaborator

V-Py commented Jun 12, 2022

Hello @nitish-darji, do you still experience this issue cause after some tests I can't reproduce it either with the current version ?
Thanks in advance :)

@V-Py
Copy link
Collaborator

V-Py commented Sep 9, 2022

No answer and not able to reproduce the bug described

@V-Py V-Py closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants