-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Issue tracker is ONLY used for reporting bugs. New feature suggestions and questions should be discussed on Community or submitted through our user feedback form.
Your issue may already be reported! Please search in the issue tracker before creating one.
Please thumbs up this issue if you have also experienced it. You may also add more information if there is something relevant that was not mentioned. However, please refrain from comments that are not constructive, like "I have this problem too", etc.
Expected behavior (required)
Tapping the "add" button should add an item to the list and retain the position on the page.
Current behavior (required)
Tapping the "add" button does add the item but the page scrolls somewhere
To Reproduce (required)
- create a local state with following structure:
{
"name":"",
"sessionOrder":1,
"activities":[
"activityName":"",
"sessionOrder":1,
"activityOrder":1,
"subActivitites":[
"subActivityName":"",
"subActivityOrder":1
]
]
} - Create a new page
- Add a list view (sessions)
- Add a text field
- Generate dynamic children from the local state on this list view
- Wrap the list view in a column and add a text "Add another session"
- Create a custom action "add session" and add this to the "on tap" action of the text "Add another session"
- Create another list view inside this (activities)
- Add a text field
- Generate dynamic children from the "$.activities" path from sessions list item on this list view
- Wrap the list view in a column and add a text "Add another activity"
- Create a custom action "add activity" and add this to the "on tap" action of the text "Add another activity"
- Create yet another list view inside this (subActivities)
- Add a text field
- Bind the text field on step 4 with the local state by giving it the value "$.name" from session list item
- Bind the text field on step 7 with local state by giving it the value "$.activityName" from the activity list item
- Bind the text field on step 10 with local state by giving it the value "$.subActivityName" from the subActivity list item
- Add a custom action for each of the text fields "sessionChangeHandler", "activityChangeHandler" and "subActivityChangeHandler" which updates the local state with its value.
- Attach this to the "onChange" action of the respective text fields
- run the app
- type something on session field
- click on the add activity button
- the activity does get added to the list but the page scrolls upwards to the field where you had typed earlier
Code can be included in this section if it is relevant to reproducing the bug.
-->
Context (required)
When I add items to my list, the page scrolls up which is an inconvenience especially if the there are lots of items in the list.
Screenshots / recordings
Scroll.issue.with.list.view.mp4
Your environment
Version of FlutterFlow used: v3.0 February 12, 2023 - Flutter 3.3.4
Browser name and version: Google Chrome 103.0.5060.134 (Official Build) (64-bit)
Operating system and version: Ubuntu 20.04.4 LTS