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

Grid and Items render twice #103

Open
OMEN44 opened this issue Dec 24, 2024 · 0 comments
Open

Grid and Items render twice #103

OMEN44 opened this issue Dec 24, 2024 · 0 comments

Comments

@OMEN44
Copy link

OMEN44 commented Dec 24, 2024

Discovered this when using the on:change event, it appears that this event fires twice in quick succession (This is very clear if you print the timestamp).

Currently i'm using this work arround:

let lastTimeStamp = -1;
const onChangeHandler = (event) => {
	if (!(event.timeStamp - lastTimeStamp < 3)) {
		// handler code goes here
	}
}

This also appears to cause Svelte's #each template to trigger twice aswell, this can be seen simularly if you print to the console when the each template is renderd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant