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

Element inside an IF block make next blade fly away #18

Closed
CKylinMC opened this issue Sep 19, 2024 · 2 comments
Closed

Element inside an IF block make next blade fly away #18

CKylinMC opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@CKylinMC
Copy link

When I use it in "if" block, it sometimes make the next blade fly away. I'm still finding what cause that. For reproduce, see this:

To reproduce this, you need to put them into a tab, inside an IF block, and have blades and Element in the same time:

<TabGroup>
	<TabPage title="A">
		<Checkbox label="Check this" bind:value={check} />
		{#if check}
			<Text label="I should inside if block and before the element" bind:value={text} />
			<Element>
				Something here
			</Element>
			<Text label="I should inside if block and after the element" bind:value={text} />
		{/if}
		<Text label="outer text" bind:value={text} />
		<Text label="outer text" bind:value={text} />
	</TabPage>
</TabGroup>

and what I want:

image

what it actually goes:

image

A text element inside IF block goes next to the outer text element.

@kitschpatrol kitschpatrol self-assigned this Sep 19, 2024
@kitschpatrol kitschpatrol added the bug Something isn't working label Sep 19, 2024
@kitschpatrol
Copy link
Owner

kitschpatrol commented Sep 19, 2024

Thank you very much for reporting this and for providing a clear and concise reproduction example.

I think I've fixed the issue, see the latest release v1.3.3. (Feel free to re-open if you find otherwise.)

Maintaining consistent ordering of elements between Svelte's declarative approach in template markup and Tweakpane's imperative approach behind the scenes has been one of the trickier parts of this project. 😅

@CKylinMC
Copy link
Author

Thanks!

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

2 participants