Topic: How to customize mdbInput?

digitalmanagerguru free asked 4 years ago


Hi there,

I've a doubt, sorry if silly, but I am currently using mdb-input component from you library and I am using https://vuejs-tips.github.io/vue-the-mask/ for applying a mask to the input, but I loaded it globally.

Then I thought: It would be awesome if I had a way to load it locally, but for that I would need to have a way to customize the mdb-input so I can add that mask locally. That way everytime I used mdb-input, the mask would be available, since it would be responsability of the mdb-input, so I could encapsulate all in the same component.

I know that since it is loaded globally I can still use it everywhere, but still, would make more sense to be able to inbuilt to the component. And this is only an example, I could want to add extra fields to improve the current mdb-input. But maybe I am seeing all this wrong.

If you could clear this out for me, would be great. Thanks!


digitalmanagerguru free answered 4 years ago


Thanks for your insight! Appreciated!


Mikołaj Smoleński staff answered 4 years ago


Hi there,

You can't change mdbInput component itself because it's loaded from node_modules directory and will be overwritten each time you update our library. The best way would be to load mdbInput inside your custom component and import mask dependency inside it (locally).

Best regards



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

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 5.8.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Win.10
  • Provided sample code: No
  • Provided link: Yes