Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend SimpleFormIterator to enable/disable rendering of index #4905

Closed
pefi1011 opened this issue Jun 6, 2020 · 2 comments
Closed

Extend SimpleFormIterator to enable/disable rendering of index #4905

pefi1011 opened this issue Jun 6, 2020 · 2 comments

Comments

@pefi1011
Copy link

pefi1011 commented Jun 6, 2020

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

The problem is UX-based - the index of an array is not always an useful/required/needed information

<ArrayInput >
          <SimpleFormIterator>
         ...
          </SimpleFormIterator>
   </ArrayInput>

Describe the solution you'd like

Conditional rendering of typography element

                            <Typography
                                variant="body1"
                                className={classes.index}
                            >
                                {index + 1}
                            </Typography>

It would be in the same fashion like disableRemove and disableAdd

<ArrayInput >
          <SimpleFormIterator disableIndex >
         ...
          </SimpleFormIterator>
   </ArrayInput>

Describe alternatives you've considered
As far as I understood, to disable rendering of Index I would need to implement my own SimpleFormIterator iterator

@pefi1011 pefi1011 changed the title Extend SimpleFormIterator to enable/disable rendering of RaSimpleFormIterator-index via prop Extend SimpleFormIterator to enable/disable rendering of index Jun 6, 2020
@pefi1011
Copy link
Author

pefi1011 commented Jun 7, 2020

Here is the PR: #4908

Any feedback will be highly appreciated

@fzaninotto
Copy link
Member

Fixed by #6305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants