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

[SelectField] Dense property not working #1089

Closed
rafaelbrier opened this issue Mar 18, 2021 · 2 comments
Closed

[SelectField] Dense property not working #1089

rafaelbrier opened this issue Mar 18, 2021 · 2 comments

Comments

@rafaelbrier
Copy link

rafaelbrier commented Mar 18, 2021

The dense property is not working in the select field.

You can see in the documentation example, when clicking "Use dense spec" nothing happens:
https://react-md.dev/packages/form/demos#select-example

The problem is that the TextFieldContainer which is used by the SelectedField should have the class "rmd-text-field-container--dense-label" applied, so it changes the --rmd-form-text-height to use the "dense" variable, but as the image below shows it does not apply.
image

To compare with a normal TextField, the className "rmd-text-field-container--dense-label" is applied.
image

--- Out of Topic

  1. The readOnly prop does not work either

  2. Question: There's anyway to clear the input with a button or something else?

@rafaelbrier
Copy link
Author

I would like to briefly congrats the work of the DEVs in this library.
I don't know how many people work on it, but it seems like few people and it's still one of the best I've seen in terms of components and theming; If you are filtering by SASS then it is the best.

Congratulations to all, when I have time I intend to contribute!

@mlaursen
Copy link
Owner

This should be fixed in the upcoming v2.7.1 release. It looks like I forgot to pass the readOnly and dense props down.

To answer your question about resetting the value, I think you should be able to reset the value by clicking a button since the value has to be controlled. A quick example: https://codesandbox.io/s/resetting-select-value-gjoyv?file=/src/Demo.tsx

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

2 participants