Skip to content

Text Field is only takes First Document's Value when Generating Children through Variables #102

@Spellytics

Description

@Spellytics

Issue

I believe I found a bug in Text Field when it's Generating Children through Variables and iterating through a list of documents queried.
It works correctly and iterates through the documents listed if it's a normal Text, but will only take the first document's value in if it is a Text Field initial value.

Example
Both the Text and Text Field has the same Variable, but the Text Field is displaying only 'Gin' as the initial value because it's only getting the first document's value. It means that you can only update the first document with the Text Field.
See screenshots.

Expected behavior (required)

Expected behaviour is for the Text Field to take on the same behaviour as Text widget when it's generating children through Variables. Text Field children should display and be connected to corresponding document's initial value and we are able to update the corresponding document value using the Text Field.

Current behavior (required)

Text Field only takes the first document and generates it repeatedly for every children it creates from the variables.

To Reproduce (required)

Steps to reproduce the behavior:

  1. Create new page
  2. Add Container Widget
  3. Add Column
  4. Add Text Field
  5. Add query from backend to Generate Children through Variables
  6. Set initial value from a String value from the variables
  7. Observe that the Text Fields generated are all the same and takes on the first document's value

Context (required)

In my app, I'm trying to get user inputs for ingredients in a recipe.
They should be able to change the ingredients they entered previously to something else.

Screenshots / recordings

image
image
image

Here are some other examples from other users
On the left a Form Textfield. On the right a normal text to check if the listview worked correctly.
image

Your environment

  • Bug Report Code:
  • Version of FlutterFlow used: 3.3.4
  • Platform (e.g. Web, MacOS Desktop): Web
  • Browser name and version: Chrome Version 106.0.5249.119
  • Operating system and version (desktop or mobile): Desktop Windows 10

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions