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

Add ability to change SelectArrayInput's size prop and fix outlined variant #8562

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

amilosmanli
Copy link
Contributor

fixes #8515

This PR fixes 2 issues with SelectArrayInput:

  • Removes hardcoded value for size prop
  • Fixes label display issue when variant is set to outlined

size prop on SelectArrayInput was hardcoded to small which was preventing modifying size of the input through MUI's theming system.

Additionally, when setting SelectArrayInput variant to outlined label of the input wasn't showing correctly. This is fixed by adding input prop with OutlinedInput component when variant is set to outlined.

Before:
Screenshot 2023-01-09 at 4 33 31 PM

After:
Screenshot 2023-01-09 at 4 34 12 PM

@slax57
Copy link
Contributor

slax57 commented Jan 10, 2023

This will supersede #8465

@amilosmanli
Copy link
Contributor Author

Hey @slax57

When do you think you could check and merge this change?

Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review, our team is a bit short-handed at the moment but hopefully this will get better soon 😇

@amilosmanli
Copy link
Contributor Author

@slax57 thanks for the review and the feedback. Addressed all the comments. PTAL

Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I'm good with the changes, thanks!

packages/ra-ui-materialui/src/input/SelectArrayInput.tsx Outdated Show resolved Hide resolved
@amilosmanli amilosmanli force-pushed the modifiable-select-array-input branch from 6b2845c to 21e1e8b Compare March 11, 2023 17:10
@amilosmanli amilosmanli requested a review from slax57 March 11, 2023 17:12
@amilosmanli
Copy link
Contributor Author

@slax57 PTAL
Sorry it took a while

@slax57 slax57 added this to the 4.9.0 milestone Mar 13, 2023
@slax57 slax57 merged commit da67d5c into marmelab:next Mar 13, 2023
@slax57
Copy link
Contributor

slax57 commented Mar 13, 2023

Thanks!

@slax57 slax57 changed the title Modifiable size prop for SelectArrayInput Add ability to change SelectArrayInput's size prop and fix outlined variant Mar 13, 2023
@davidhenley
Copy link
Contributor

davidhenley commented Mar 28, 2023

I noticed the label had the same issues in the ReferenceManyInput (ra-relationships) as well. Does this fix that too?

@slax57
Copy link
Contributor

slax57 commented Mar 29, 2023

@davidhenley ReferenceManyInput does not render a SelectArrayInput (unless this is one of the inputs you pass as children of the SimpleFormIterator of course), so I think you may have mistaken it with ReferenceManyToManyInput.
If you are referring to ReferenceManyToManyInput then yes, this PR should fix it as well, provided you upgrade the latest react-admin version of course.

@davidhenley
Copy link
Contributor

davidhenley commented Mar 29, 2023

@slax57 No, I'm talking about ReferenceManyInput. The label is off only on the outline variant and doesn't match the other inputs. Just wondered if this fixed that as well, but seems to be a different bug. Since it's enterprise, I'm not sure where to open that issue though.

    <TextInput source="name" helperText="some text" />
    <ReferenceManyInput reference="products" target="testId">
      <SimpleFormIterator>
        <TextInput source="size" />
      </SimpleFormIterator>
    </ReferenceManyInput>

CleanShot 2023-03-29 at 10 11 23

@slax57
Copy link
Contributor

slax57 commented Mar 31, 2023

@davidhenley Thanks for the additional info.
For issues related to Enterprise components, you simply need to write an email to the support desk (email can be found here: https://marmelab.com/ra-enterprise/#support).
Now regarding the label position issue with ReferenceManyInput, I believe it was fixed with ra-relationships v4.1.6.
If ever this does not solve your issue then please write an email to our support desk. We'd be happy to help 🙂

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

Successfully merging this pull request may close these issues.

3 participants