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

Allow binding to Row's inner div #422

Merged
merged 1 commit into from
Jan 23, 2022
Merged

Allow binding to Row's inner div #422

merged 1 commit into from
Jan 23, 2022

Conversation

OJFord
Copy link
Contributor

@OJFord OJFord commented Jan 13, 2022

Closes #409.

@bestguy bestguy merged commit efe5b0a into bestguy:master Jan 23, 2022
@OJFord OJFord deleted the impl-409 branch January 23, 2022 13:15
@bestguy
Copy link
Owner

bestguy commented Jan 23, 2022

Thanks @OJFord , released in https://github.com/bestguy/sveltestrap/releases/tag/v5.8.3

@OJFord
Copy link
Contributor Author

OJFord commented Jan 23, 2022

Thanks! Sorry about the test, not sure what happened there.

@bestguy
Copy link
Owner

bestguy commented Jan 23, 2022

Np, it's looks correct, must be some jest/DOM issue


test('should bind inner div', () => {
let inner;
const { container } = render(Row, { props: { class: "test-123", inner }});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's because this is like:

<Row class="test-123" inner />

but it should be:

<Row class="test-123" bind:inner />

It doesn't seem to be possible to achieve this with @testing-library/svelte (v3.0.3 as used here, and the latest available at time of writing) - though possibly it should be if it updated its version of Svelte's component API - it's not clear to me what context is, it sounds like maybe { props: {...}, context: {"bind:inner": inner } should work, but it claims that:

Valid Svelte options are [anchor,props,hydrate,intro]

which is incomplete, per the link above.

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

Successfully merging this pull request may close these issues.

Access/set Row's div's scrollTop?
2 participants