react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Avoid "no source" warning when theres a finalSource in useInput

Open GuilhermeCarra opened this issue 1 year ago • 0 comments

Problem

Currently useInput is generating erroneous warnings when using ArrayInput with TextInput without source. The source is provided by useWrappedSource

        <ArrayInput source="users">
              <SimpleFormIterator>
                  <TextInput source="" />
              </SimpleFormIterator>
        </ArrayInput>

Solution

Change conditional check to finalSource

How To Test

Create an ArrayInput as indicated

Additional Checks

  • [x] The PR targets master for a bugfix, or next for a feature
  • [ ] The PR includes unit tests (if not possible, describe why)
  • [ ] The PR includes one or several stories (if not possible, describe why) (N/A)
  • [ ] The documentation is up to date

Also, please make sure to read the contributing guidelines.

GuilhermeCarra avatar Aug 20 '24 11:08 GuilhermeCarra