Skip to content

M.textareaAutoResize function missing in the release 2.0.0-alpha #362

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

Closed
OlivierMadant opened this issue Apr 22, 2023 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@OlivierMadant
Copy link

OlivierMadant commented Apr 22, 2023

Hi,

The function M.textareaAutoResize() is no longer accessible in the release 2.0.0-alpha
That function is described in the textarea documentation as the function we need to execute when dynamically changing the value of a textarea.

Is it because now the Textfields are css only in 2.0.0-alpha?
In this case, perhaps the documentation should be adapted?

Thank you for this new version and your excellent work,

Olivier

@OlivierMadant OlivierMadant changed the title M.textareaAutoResize function missing M.textareaAutoResize function missing in the release 2.0.0-alpha Apr 22, 2023
@OlivierMadant
Copy link
Author

OlivierMadant commented May 25, 2023

Hello,

The problem is still present with the version 2.0.1-alpha.
The function M.textareaAutoResize() was working properly before the release 2.0.0-alpha.

The function still seems necessary because the height of the textarea is not updated when dynamically changing the value of a textarea.

We can reproduce the issue really simple by navigating to https://materializeweb.com/text-inputs.html
And execute in the console:
document.getElementById('textarea1').value = 'Hello \nMaterialize\nTeam.\nThis\nframework\nis\nawesome!'

Thank you again for your excellent work!

@FewCryptos
Copy link

Hello,
The function M.updateTextFields() was also removed, but still need to be used.
Thank you

@mauromascarenhas mauromascarenhas added the bug Something isn't working label Jun 14, 2023
@mauromascarenhas
Copy link

mauromascarenhas commented Jun 14, 2023

Hello,

I've checked the repo and, in fact, those functions have been removed (probably durin the transition from JS to TS + jQuery removal).
I'll try to reimplement them asap.

Thank you for your feedback :)


UPDATE [1]

Actually, textareaAutoResize has been implemented and is available here. I just do not know why it was not exported (I'll try to reference it under "M.Forms.textareaAutoResize").

"updateTextFields" on the other hand, seems to have been completely removed. I'll try to reimplement it and reference it under "M.Forms.updateTextFields".


** UPDATE [2] **

It seems that the removal of updateTextFields was on purpose (check d745bc2 and 16697c3). Therefore, I'll just expose textAreaAutoResize under M.Forms.textareaAutoResize for a while.

@mauromascarenhas mauromascarenhas self-assigned this Jun 14, 2023
@wuda-io
Copy link
Member

wuda-io commented Jun 15, 2023

Hello, I removed updateTextFields, because it is no needed anymore.
The Label-Animation is now fully done in CSS.
The only thing needed now is a placeholder Attribute in the Inputs. I see that this i missing in the documentation.
This needs a documentation update.

@OlivierMadant
Copy link
Author

You are marvellous. Thank you so much! You are my heroes of the week ;-) !

@mauromascarenhas
Copy link

As of #382. this issue must be resolved 😄

@OlivierMadant
Copy link
Author

Thank you so much for fixing the issue and updating the documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants