Topic: How to get the value of MDBChipsInput
Expected behavior I want to get the value of MDBChipsInput
Actual behavior
Resources (screenshots, code snippets etc.)
Aliaksandr Andrasiuk
staff answered 2 years ago
Hi,
There is no possibility to getValue from MDBChipsInput component.
But if it is necessary we can add this feature in the future.
Best regards.
Christian Aichner
pro premium answered 2 years ago
Hi!
Actually there is a way. It is not pretty though.
Check out the way I fixed it on my GitHub:https://github.com/aichner/Company-Homepage/blob/add-blogger-1/src/components/pages/BlogListLabel/index.jsx
To Aliaksandr: It would be nice if you overhaul the entire thing. There is no way of cleanly reading the value of all chips, neigter is there a working way to register deleted chips.
Best regards, Chris
Aliaksandr Andrasiuk
staff answered 2 years ago
Hi,
I've checked your realization and yes - it's a little bit complicated but it works :)
Honestly, it's an old component which probably will be refactored in the future.
Probably, we will implement the method to which allows getting values in the near future.
Best regards.
Answered
- User: Free
- Premium support: No
- Technology: React
- MDB Version: 4.13.0
- Device: Macbook
- Browser: Chrome
- OS: OSx
- Provided sample code: No
- Provided link: No