rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
219 stars 57 forks source link

null reference issue #4

Closed LarkLib closed 5 years ago

LarkLib commented 5 years ago

I got a null reference issue when global search a string. I think this line pop it. VueBootstrap4Table.vue line 661: if (typeof value === "undefined") { It's working when changed to: if (value == null || typeof value === "undefined") {

rubanraj54 commented 5 years ago

Thanks for reporting the issue. @LarkLib

I've planned for a new release with more features in this weekend. I will fix the above issue in new release.

And it would be great if you post your columns and config data to reproduce the issue on my side.

LarkLib commented 5 years ago

It got a "Promise is undefined" issue in IE 11 May be to run "npm install --save babel-polyfill" to resolute it.

pop this error in my app when run in IE 11, it should be also a compatibility issue.

SCRIPT1046: Multiple definitions of a property not allowed in strict mode [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

rubanraj54 commented 5 years ago

It got a "Promise is undefined" issue in IE 11 May be to run "npm install --save babel-polyfill" to resolute it.

pop this error in my app when run in IE 11, it should be also a compatibility issue.

SCRIPT1046: Multiple definitions of a property not allowed in strict mode [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

is this a new issue or belongs to the "null reference issue"? @LarkLib

I will do a test in IE11 also. But IMHO, use es6-promise polyfill plugin in your app.

require('es6-promise').polyfill();

Anyway I will give a try with polyfill and check how the final bundle looks like.

rubanraj54 commented 5 years ago

Hey @LarkLib

I tried with IE 10 and 11. I got only the polyfill error and this is not coming from the plugin.

The polyfill error was from axios request to pull the dummy data to populate the table for testing.

If you use axios or promise based plugin in your application, then just install es6-promise and include this require('es6-promise').polyfill(); code in your main javascript file. This solves the promise issue in IE >= 10.

I didn't get the other error which you mentioned above.

SCRIPT1046: Multiple definitions of a property not allowed in strict mode

And the real issue "null reference issue" is fixed in the develop branch and will be included in the next release most probably this weekend.

LarkLib commented 5 years ago

SCRIPT1046: Multiple definitions of a property not allowed in strict mode This error should from the multi definitions of "per_page" in same code scope. VueBootstrap4Table.vue line 1046: per_page: { line 1140: per_page(newVal,oldVal) {

rubanraj54 commented 5 years ago

Yup., you're right.

Actually a week before I was moving pagination code to a separate component and forget to cleanup this extra code (in line 1140). I will clean that too.

Thanks your great contribution.

rubanraj54 commented 5 years ago

fixed this issue in version 1.0.17