Chips with editable content does not show initialValues spec


Topic: Chips with editable content does not show initialValues specified

Realmonitor Ltd pro premium priority asked 3 weeks 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 3 weeks ago

You're missing chips-initial class that is needed for example to work.


Realmonitor Ltd pro premium priority commented 3 weeks 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 pro premium priority commented 3 weeks 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 3 weeks 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 pro premium priority commented 2 weeks ago

Thanks, now its works!


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • 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