MaximilianPichler / material-ui-selectfield

https://maximilianpichler.github.io/material-ui-selectfield/
6 stars 4 forks source link

floatingLabel not working properly in singleSelection #12

Open shivwork opened 6 years ago

shivwork commented 6 years ago

By default floatingLabel stays Up, it should be down. When i click the field its works great.

MaximilianPichler commented 6 years ago

In the floating-label demo it is working correctly. It is in the default position and on click it moves up. Can you maybe check the demo code and see if your code is the same

shivwork commented 6 years ago

Seen Your demo. Its working good. Can you share demo's code. This is my code. <MaterialSelectField showAutocompleteThreshold={1} hintText='' errorText={touched && error} floatingLabel={label} value={selectedObj} nb2show={7} anchorOrigin={{ vertical: 'top', horizontal: 'left' }} required={true} onChange={(e) => changeSelectedObj(e)} hoverColor='rgba(3, 169, 244, 0.15)'

{optionsList}

MaximilianPichler commented 6 years ago

The demo Code is in the repo

shivwork commented 6 years ago

Can you suggest me what i am doing wrong. <MaterialSelectField showAutocompleteThreshold={1} hintText='' errorText={touched && error} floatingLabel={label} value={selectedObj} nb2show={7} anchorOrigin={{ vertical: 'top', horizontal: 'left' }} required={true} onChange={(e) => changeSelectedObj(e)} hoverColor='rgba(3, 169, 244, 0.15)'

{optionsList}

MaximilianPichler commented 6 years ago

Are you sure you are using the newest version? Also make sure to follow https://github.com/Sharlaan/material-ui-superselectfield All new Updates will be released there

MaximilianPichler commented 6 years ago

Also you have a hintText. Try removing that

shivwork commented 6 years ago

Removed hintText. Still not working. <MaterialSelectField showAutocompleteThreshold={1} errorText={touched && error} floatingLabel={label} value={selectedObj} nb2show={7} anchorOrigin={{ vertical: 'top', horizontal: 'left' }} required={true} onChange={(e) => changeSelectedObj(e)} hoverColor='rgba(3, 169, 244, 0.15)'

{optionsList}

FDiskas commented 6 years ago

Same problem :eyeglasses: