Autocompleter in an Angular Library


Topic: Autocompleter in an Angular Library

Ritten pro asked 6 years ago

Expected behavior I am trying to build a library for my shared components. I have added mdb-bootstrap to my library. For all components, this works great. However for autocompleter i get the following errors:

Error: projects/mdb-pro/src/lib/autocompleter/autocompleter.component.html(1,1): : Directive MdbAutoCompleterDirective, Property '_handleInput' is protected and only accessible within class 'MdbAutoCompleterDirective' and its subclasses.
projects/mdb-pro/src/lib/autocompleter/autocompleter.component.html(1,1): : Directive MdbAutoCompleterDirective, Property '_handleKeyDown' is protected and only accessible within class 'MdbAutoCompleterDirective' and its subclasses.
projects/mdb-pro/src/lib/autocompleter/autocompleter.component.html(1,1): : Directive MdbAutoCompleterDirective, Property '_handleFocusIn' is protected and only accessible within class 'MdbAutoCompleterDirective' and its subclasses.
projects/mdb-pro/src/lib/autocompleter/autocompleter.component.html(1,1): : Directive MdbAutoCompleterDirective, Property '_handleBlurIn' is protected and only accessible within class 'MdbAutoCompleterDirective' and its subclasses.
projects/mdb-pro/src/lib/autocompleter/autocompleter.component.html(1,1): : Directive MdbAutoCompleterDirective, Property '_handleMouseDown' is protected and only accessible within class 'MdbAutoCompleterDirective' and its subclasses.

I am not accessing any of these protected methods directly.

Actual behavior

This would hopefully work like all other MDB components.

Resources (screenshots, code snippets etc.)

I recreated this issue in git. The readme outlines everything.

But it shows autocompleter working when running in the main application, and failing when in a library.

Because this is a pro-element, i xxxxx'd out my token from the package.json file. ( In both the main one, and the Library file)

https://github.com/RittenInc/mdb-autocompleter


Damian Gemza staff answered 6 years ago

Dear @Ritten

Those problems should be resolved with the latest version of MDB Angular (7.5.4). Please update your project to the latest MDB Angular version, and let me know if the problem is gone.

Best Regards,

Damian


Ritten pro answered 6 years ago

Thanks @Damian Gemza

This did fix my issue!

Cheers, Chris


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: No
  • Technology: MDB Angular
  • MDB Version: 7.5.1
  • Device: Computer
  • Browser: Chrome
  • OS: MacOS
  • Provided sample code: No
  • Provided link: Yes