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

Disabling label output in the SelectInput component as in the TextInput component #3657

Closed
MaxAlex666 opened this issue Sep 8, 2019 · 4 comments

Comments

@MaxAlex666
Copy link

react-admin: 2.9.6
In the TextInput component, you can completely hide the line with the label using the attribute label={false}.
In the SelectInput component, you can only hide the label text with the label="" attribute, but the empty string still remains.
Using a small change, it is possible to implement a similar behavior for SelectInput:

SelectInput.propTypes = {
    label: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
    ...
        return (
            <ResettableTextField
                select
                margin="normal"
                value={this.state.value}
                label={ label === false ? null :
                    <FieldTitle
                ...  
@rahulmalhotra
Copy link

Hey @Kmaschta I would like to work on this issue, can you assign it to me ?

@Kmaschta
Copy link
Contributor

Kmaschta commented Oct 2, 2019

@rahulmalhotra Any contribution is welcome! Thanks
We do not assign issues, you can open a PR and add Closes #3657 in the description, the issue will be linked automatically.

Since it's a new feature, don't forget to aims your PR at the branch next

@rahulmalhotra
Copy link

Got that. Working on the same. Thanks..!!

@fzaninotto
Copy link
Member

Fixed by #3806

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

4 participants