Skip to content

ChoiceChips widget state getting mixed when turned to custom component #579

@KamyMouss

Description

@KamyMouss

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

When choice chips are converted to custom components, the internal selected state of 2 distinct ChoiceChips are mixed together if they are displayed in the same location (such as in form with conditional branches, where the next option is in the same location)

Expected Behavior

ChoiceChips that are custom components should each have their own state (as with choice chips that aren't custom components)

Steps To Reproduce

  1. Create a custom component with a choice chip widget that has 2 buttons
  2. Create 3 of these custom component choice chips where A B C, where Choice B is conditionally shown when Button 1 in A is selected, and Choice C is conditionally shown when Button 2 is selected.

image

  1. To repro the bug:
  • Select choice Button 1 in Choice Chips A
  • Select choice Button 1 in Choice Chips B

image

  • Select choice Button 2 in Choice Chips A
  • Select choice Button 2 in Choice Chips C

image

BUG: Notice that the index of Choice Chip B is being modified to Button 2 when choosing Button 2 in Choice Chip C.

Bug Report Code

IT4skvLluI9OvuZE1qrucu1B/TsXOUh8RpI0scpCbw4bIYj2P4lzY876PxNWZMOnTwlEJGe2p14d06HqjuzXO/ICAEmtRb44/rlcagrMLUyVWpuTF7WST2h6L9phfGah0cOzhCYmHPZpSmwa1DuxNeu+QnHbQL70NWo8Sq/LZO4=

Context

I'm trying to create a conditional form based on custom components with choice chips inside of them. This breaks the flow if a user goes back on the form and selects a different option in a previous question.

Additional info

No response

Environment

- FlutterFlow version: 3.1
- Platform: Web
- Browser name and version: Chrome
- Operating system and version affected: Windows

Metadata

Metadata

Labels

status: wontfixThis will not be worked on.type: bugSomething isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions