Skip to content

Conversation

@OlivierMadant
Copy link

@OlivierMadant OlivierMadant commented Aug 20, 2023

Proposed changes

The current Forms.Init() function creates a DOMContentLoaded event which, when fired, will initialize the textareas and File Input Path present when the dom is loaded.
This mean that if we create a texarea programmatically, calling the Forms.Init() function will do nothing on the new created textarea.
We currently have no way to call the js code needed to initiate the textarea using the available functions.

That Pull request add the functions that will allow us to initialize the textarea and the File Input Path created programmatically.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@OlivierMadant
Copy link
Author

If the proposal is validated, I will adapt the documentation accordingly :-)

@OlivierMadant OlivierMadant changed the title Add the functions to initiate the textarea and the File Input Path created programmatically Add functions to initiate textarea and the File Input Path created programmatically Aug 20, 2023
@OlivierMadant OlivierMadant changed the title Add functions to initiate textarea and the File Input Path created programmatically Add functions to initialize textarea and the File Input Path created programmatically Aug 21, 2023
@wuda-io
Copy link
Member

wuda-io commented Aug 21, 2023

Can you please change the commit messages into the correct format. Thank you.
Otherwise looks good 👍

@OlivierMadant OlivierMadant force-pushed the main branch 2 times, most recently from f20715f to 29aef95 Compare August 23, 2023 11:06
@OlivierMadant
Copy link
Author

Hello,

Thanks for the feedback.
I updated the commit messages.
I will prepare another PR for the documentation.
Have a nice day!

@OlivierMadant
Copy link
Author

The documentation has been adapted accordingly.
Thanks in advance for the review!

Copy link
Member

@wuda-io wuda-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wuda-io wuda-io merged commit a9b7af8 into materializecss:v2-dev Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants