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

fix autoscroll on stateful children #4858

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

adhami3310
Copy link
Member

No description provided.

@adhami3310
Copy link
Member Author

tested with

import reflex as rx

app = rx.App()


class State(rx.State):
    field: str = "Hello, World!"

    @rx.event
    def double_field(self) -> None:
        self.field *= 2


@app.add_page
def index():
    return rx.vstack(
        rx.box(
            rx.auto_scroll(
                rx.text(State.field),
                height="100%",
                width="100%",
                overflow="auto",
            ),
            height=200,
            width=200,
        ),
        rx.button("Double", on_click=State.double_field),
    )

Copy link

codspeed-hq bot commented Feb 21, 2025

CodSpeed Performance Report

Merging #4858 will not alter performance

Comparing fix-autoscroll-on-stateful-children (8f56957) with main (8943341)

Summary

✅ 12 untouched benchmarks

@tgberkeley tgberkeley merged commit ee03415 into main Feb 21, 2025
43 checks passed
@tgberkeley tgberkeley deleted the fix-autoscroll-on-stateful-children branch February 21, 2025 23:09
masenf pushed a commit that referenced this pull request Feb 24, 2025
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.

2 participants