FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
117 stars 19 forks source link

DataTable widget code generation fail #2088

Closed Miamoto-Musashi closed 8 months ago

Miamoto-Musashi commented 8 months ago

Has your issue been reported?

Current Behavior

building datatable from api call on google maps places result return a compilation error once run on test

Expected Behavior

error should be hilighted before test run on UI or there shouldn't be any error

Steps to Reproduce

  1. define google api call with jsonpath for places
  2. use api results in data table widget
  3. use item value for text widgets
  4. run in test mode
  5. compilation fails

Reproducible from Blank

Bug Report Code (Required)

IT4SlefqwItOpbxJ7qX2bsEw+SoUKVAjRYI7lexqEAoYIpOtPOwxXOj9VEpoTcOHd2xEOlmY8XsK0NmOkeDlEsI9PiiCfKZmzqpxFg7ic3KtMZivDM6BOXB5L59VG22Hzbe33xVRNvdYWFo4wFyqH+68ZA/sO5f6C1UNAcikEJ/IpGDnLTLOXn0Jg1ZSfCvr

Context

I'm tryin to use data table with places api results

Visual documentation

Screenshot 2024-01-02 alle 12 54 30

Additional Info

Screenshot 2024-01-02 alle 12 56 01 Screenshot 2024-01-02 alle 12 59 54

Environment

- FlutterFlow version: 4.0
- Platform: Web
- Browser name and version:Microsoft Edge Version 119.0.2151.97 (official build) (x86_64)
- Operating system and version affected: MacOs
Miamoto-Musashi commented 8 months ago

additional info: after some experiments I found out the problem is given by the checkbox that is statically set to false, waiting for user input; the generated code thinks is set by the element variable

hariprasadms commented 8 months ago

Hi @Miamoto-Musashi - Are you still experiencing the issue ?

I reviewed your project, but I couldn't find the checkbox widget within the table. I did a test using a data table with checkbox widget as its children through an API call, and the test ran smoothly without any errors. However, in code view I observed that it automatically maps the checkbox value to the response item _model.checkboxValueMap[todosItem] ??= true, which seems incorrect.

Miamoto-Musashi commented 8 months ago

HI @hariprasadms , thanks for the review; to go ahead with the project I changed the UI and used a button instead of the checkbox; with the button the issue is not anymore present. I'm not sure if the issue was coming from a previous assignement I was using for initial value of the checkbox, then reverted, or by the assumptions made during code generation. If it helps I can help investigating by reverting to the historical version where the problem was present.

BR

victoriahuang1 commented 8 months ago

Hi @Miamoto-Musashi , thanks for the report. I have put out a fix for this issue, and it should be resolved upon the next deploy.