[1851] fixed the label of textfield in form when its label position to start #1854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket: #1851
Fixed an issue where form labels weren't updating their visibility state when the associated input field's visibility was toggled. While input fields correctly handled visibility changes, it was because the labels added separately in the form layout weren't being rebuilt again.
Changes made:
ValueListenableBuilder
in form'sbuildGrid
method to rebuild the grid layout when properties changeformStateNotifier
inFormController
to track form state changesTextInputState
to notify form of any controller property updatesPreviously, changing an input field's visibility only affected the input itself, leaving its label in an inconsistent state. Now, the entire form grid rebuilds whenever any property changes, ensuring labels and inputs stay in sync.
Test EDL:
Bug:
![Bug image](https://private-user-images.githubusercontent.com/76642732/408207926-24cbbfd5-73ab-4a1e-9141-0edd8b20e2fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDY2MTIsIm5iZiI6MTczOTM0NjMxMiwicGF0aCI6Ii83NjY0MjczMi80MDgyMDc5MjYtMjRjYmJmZDUtNzNhYi00YTFlLTkxNDEtMGVkZDhiMjBlMmZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3NDUxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU3N2UyYTE1NGQ2ZTM3ZDUwNzBmMjM0YWU1MmQxYzUwZGZiMjNjYThjNmY5YjMxMjI3NmI2NWU0OTJmYTNiY2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.URchoOZR-lwyif_8mMPohAQXqkb8qv61zdDrl62WQTw)
![Fixed image](https://private-user-images.githubusercontent.com/76642732/408207821-becb2e5a-3d4c-457d-bdf4-4eb80c95b417.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDY2MTIsIm5iZiI6MTczOTM0NjMxMiwicGF0aCI6Ii83NjY0MjczMi80MDgyMDc4MjEtYmVjYjJlNWEtM2Q0Yy00NTdkLWJkZjQtNGViODBjOTViNDE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3NDUxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlMGIzMjA3MTViNWZhZGI2MzExYWNhOTJiNWIwMzMxZDA0ZmE3Mjc1OTg3YjBiZWIwNDc1YjAzMzZiZDMxYzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HtKJ9N3yR0-C90npB43QAddQsNAf_U2dhV_FXElwfGU)
Fixed: