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

floatingLabel animation not working. #67

Open
shivwork opened this issue Oct 9, 2017 · 8 comments
Open

floatingLabel animation not working. #67

shivwork opened this issue Oct 9, 2017 · 8 comments
Labels

Comments

@shivwork
Copy link

shivwork commented Oct 9, 2017

floatingLabel should be up on field focus and down on focus out. Its working fine with multiple selections, but not in case of single selection.

@MaximilianPichler
Copy link
Collaborator

Hey! I've fixed it in version 1.0.2 over on my fork https://github.com/MaximilianPichler/material-ui-selectfield

@shivwork
Copy link
Author

Installed "material-ui-selectfield": "^1.0.2".Still Not working.
On Focus : -
open
Without Focus : -
sdfdsfsdff

@MaximilianPichler
Copy link
Collaborator

Yeah sorry I noticed that bug after releasing. Check out the demo "Floating label" here https://maximilianpichler.github.io/material-ui-selectfield/
This is version 1.0.21
If you find any more issues please open an issue over on my fork.

@shivwork
Copy link
Author

shivwork commented Oct 11, 2017

floatingLabel not working properly in singleSelection.
By default floatingLabel stays Up, it should be down. When i click the field its works great.

@Sharlaan Sharlaan added the bug label Oct 14, 2017
@Sharlaan
Copy link
Owner

v1.6.1 is out, should fix this issue.
Please confirm.

@shivwork
Copy link
Author

shivwork commented Nov 1, 2017

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

@Sharlaan
Copy link
Owner

Sharlaan commented Nov 6, 2017

At 1st glance, looks like you didnot read the documentation -again- :

  • required prop isnot implemented yet
  • anchorOrigin value is useless since it is the same as default value
  • {disabled ? disabled : false} --> {disabled || false} is simpler
  • when you "think" there is no option selected, did you check the value of selectedObj is null ? an empty object is still a valid non null value, so the floatingLabel will float above, while the component will show an empty field.

If the problem still persists, can you make a PR reproducing this issue ?

@Sharlaan
Copy link
Owner

Please check with latest version.

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

No branches or pull requests

3 participants