-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[REF-2196] Create rx.scroll_to
special event
#2834
Comments
rx.scroll_to
special eventrx.scroll_to
special event
@picklelo which folder/module does this special event go to? is it the same as rx.console_log ? |
@Yummy-Yums yes we can put it in the same folder. I'm thinking this can maybe just be an alias that returns the |
Will select by ID be enough for this use case? What of using the query
selector i.e. Selecting by Class or that's not necessary for now
…On Wed, Mar 13, 2024, 10:17 PM Nikhil Rao ***@***.***> wrote:
@Yummy-Yums <https://github.com/Yummy-Yums> yes we can put it in the same
folder. I'm thinking this can maybe just be an alias that returns the
call_script above (i.e. we don't need to modify anything in the
Javascript side).
—
Reply to this email directly, view it on GitHub
<#2834 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASS5PMGG7RBHNQWVWLVT2B3YYDGAXAVCNFSM6AAAAABEREYWZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVHE4DONZSGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The ID should be enough for now (we can add more fancy stuff later). You can see here for an example of how I've used this: https://github.com/picklelo/reflex-chat/blob/main/custom_components/reflex_chat/chat.py#L75 |
@picklelo quick one, I intended to use the latter but based on our example above, a simple return call_script will work but that already returns an EventSpec , so how will the fn_name/signature be seen on the js side? |
@Yummy-Yums the way you have it in your PR is exactly what I was thinking, we don't need anything on the js side for this function. Will review your PR this weekend. |
We should have a special event handler called
rx.scroll_to("id")
that will scroll to the element with the given id.The current way to accomplish this is
But there should be a simpler API that wraps this.
REF-2196
The text was updated successfully, but these errors were encountered: