mdb pro Select and Datepicker not working on production buil


Topic: mdb pro Select and Datepicker not working on production build

maverik1815 asked 6 years ago

Expected behavior select and Datepicker should work "ng build --prod" without ant console error

Actual behavior select and datepicker are working fine on "ng serve" but when angular is deployed using "ng build --prod " with node server, select and datepicker doesnt work, CSS is broken , cannot select option once select( if we want to change selection, options doesn't shows up on reselect) Resources (screenshots, code snippets etc.) Error in console => ERROR TypeError: Cannot read property 'optionHeight' of undefined at main.e7ce7d422dfb82599753.js:1 at n.getOptionStyle (main.e7ce7d422dfb82599753.js:1) at Object.updateDirectives (main.e7ce7d422dfb82599753.js:1) at Object.updateDirectives (main.e7ce7d422dfb82599753.js:1) at ku (main.e7ce7d422dfb82599753.js:1) at ju (main.e7ce7d422dfb82599753.js:1) at Pu (main.e7ce7d422dfb82599753.js:1) at Object.ku [as checkAndUpdateView] (main.e7ce7d422dfb82599753.js:1) at n.detectChanges (main.e7ce7d422dfb82599753.js:1) at n.updateSelectAllState (main.e7ce7d422dfb82599753.js:1) Ul @ main.e7ce7d422dfb82599753.js:1 n.handleError @ main.e7ce7d422dfb82599753.js:1 St @ main.e7ce7d422dfb82599753.js:1 (anonymous) @ main.e7ce7d422dfb82599753.js:1 (anonymous) @ main.e7ce7d422dfb82599753.js:1 e.invokeTask @ polyfills.97e96d5a7d592053705c.js:1 onInvokeTask @ main.e7ce7d422dfb82599753.js:1 e.invokeTask @ polyfills.97e96d5a7d592053705c.js:1 t.runTask @ polyfills.97e96d5a7d592053705c.js:1 t.invokeTask @ polyfills.97e96d5a7d592053705c.js:1 _ @ polyfills.97e96d5a7d592053705c.js:1 m @ polyfills.97e96d5a7d592053705c.js:1 main.e7ce7d422dfb82599753.js:1 ERROR TypeError: Cannot read property 'clearFilterInput' of undefined at n.clearFilterInput (main.e7ce7d422dfb82599753.js:1) at n.closeDropdown (main.e7ce7d422dfb82599753.js:1) at main.e7ce7d422dfb82599753.js:1 at HTMLDocument. (main.e7ce7d422dfb82599753.js:1) at e.invokeTask (polyfills.97e96d5a7d592053705c.js:1) at Object.onInvokeTask (main.e7ce7d422dfb82599753.js:1) at e.invokeTask (polyfills.97e96d5a7d592053705c.js:1) at t.runTask (polyfills.97e96d5a7d592053705c.js:1) at t.invokeTask [as invoke] (polyfills.97e96d5a7d592053705c.js:1) at _ (polyfills.97e96d5a7d592053705c.js:1)


maverik1815 commented 6 years ago

error started when i added following code in angular.json => "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true

it is a legit code, mdb pro is breaking with these settings, all pro component are working s expected only select and datepicker have issues


Arkadiusz Idzikowski staff commented 6 years ago

Thank you for all the details. We will take a closer look at this problem.


Damian Gemza staff answered 6 years ago

Dear @maverik1815

Could you please provide me reproduction steps with which I'll be able to reproduce your problem?

I have tried to reproduce it on a brand new project where there was mdb-select and mdb-date-picker components, but without success - for me, there are no such errors while compiling.

Without reproduction steps, or reproduction repository I won't be able to help you well.

If it's possible, please send me your app via email. You can find me here: d.gemza@mdbootstrap.com

Best Regards,

Damian


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.0
  • Device: Desktop
  • Browser: chrome,firefox
  • OS: ubuntu,windows 10
  • Provided sample code: No
  • Provided link: No