material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[SelectField] Misplaced errorText when no item selected

Open antoinerousseau opened this issue 10 years ago • 3 comments

Problem Description

When no item is selected in the list, and an error is set, I get:

capture d ecran 2016-03-01 22 52 26

But once I select an item the styling is OK:

capture d ecran 2016-03-01 22 54 12 ## Versions - Material-UI: 0.15.0-alpha.1 and 0.14.3 - React: 0.14.7 - Browser: Chrome 48 OSX

antoinerousseau avatar Mar 02 '16 04:03 antoinerousseau

I see this on the docs example too: http://www.material-ui.com/#/components/select-field

nathanmarks avatar Mar 02 '16 05:03 nathanmarks

Hi @antoinerousseau for now you can fix this by adding following condition in your SelectField

errorText={this.state.value? (Yourcondition && 'Error text') : null}

heetvachhani avatar Mar 02 '16 20:03 heetvachhani

@heetvachhani thanks but it does not fix the problem (I don't see why in your solution? this is a styling issue)

antoinerousseau avatar Mar 03 '16 00:03 antoinerousseau