Topic: Chips with editable content does not show initialValues specified
                  
                  Realmonitor Ltd
                  priority
                  asked 9 months ago
                
Expected behavior I expect to see the specified initialValues to show up in editable chips
Actual behavior Nothing shows up.
Resources (screenshots, code snippets etc.) snippet created: https://mdbootstrap.com/snippets/standard/realmonitor-ltd/6357360#js-tab-view
                      
                      Kamila Pieńkowska
                      staff
                        answered 9 months ago
                    
You're missing chips-initial class that is needed for example to work.
Realmonitor Ltd priority commented 9 months ago
After adding the class, the control duplicated: one of them has the initial value the other one empty. Please see the modified snippet!
Realmonitor Ltd priority commented 9 months ago
I also tried to remove the "existing" instance, but it does not work: The "tmp" is null.
Please set this issue to Unanswered please!
const tmp = mdb.ChipsInput.getInstance(control); if (tmp && typeof tmp.dispose === 'function') { tmp.dispose(); }
Kamila Pieńkowska staff commented 9 months ago
I should have been more precise. The placeholder class was unnecessary. Here is fixed example: https://mdbootstrap.com/snippets/standard/kpienkowska/6358773
Realmonitor Ltd priority commented 9 months ago
Thanks, now its works!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- ForumUser: Priority
 - Premium support: Yes
 - Technology: MDB Standard
 - MDB Version: MDB5 8.2.0
 - Device: Laptop
 - Browser: Chrome Version 132.0.6834.159 (Official Build) (64-bit)
 - OS: Linux Pop!_OS 22.04 LTS
 - Provided sample code: No
 - Provided link: Yes