Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: this.getObjectValue is not a function #8

Closed
jeroenherczeg opened this issue Apr 27, 2016 · 18 comments
Closed

TypeError: this.getObjectValue is not a function #8

jeroenherczeg opened this issue Apr 27, 2016 · 18 comments

Comments

@jeroenherczeg
Copy link
Contributor

I don't know if it is related to me or with the 1.0.9 release

But with a very basic setup, i get TypeError: this.getObjectValue is not a function

@jeroenherczeg
Copy link
Contributor Author

screen shot 2016-04-27 at 13 23 13

If I do this, then I get a result.

@ratiw
Copy link
Owner

ratiw commented Apr 27, 2016

@jeroenherczeg You modification is correct. I just wonder why I never got the error and made me overlook it. Will fix it tonight though. Many thanks for reporting.

@ratiw
Copy link
Owner

ratiw commented Apr 27, 2016

@jeroenherczeg Done. If something looks strange to you, please do not hesitate to let me know. Thanks again for reporting. :)

@ratiw ratiw closed this as completed Apr 27, 2016
@jeroenherczeg
Copy link
Contributor Author

`npm install
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.7.3

npm ERR! No compatible version found: vuetable@^1.0.10
npm ERR! Valid install targets:
npm ERR! 1.0.9
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues`

I think you have to bump the version number on the npm site?
I am also new to npm packages (:

@ratiw
Copy link
Owner

ratiw commented Apr 27, 2016

@jeroenherczeg Can you please try again?

@jeroenherczeg
Copy link
Contributor Author

jeroenherczeg commented Apr 27, 2016

success! vuetable@1.0.10
but i still get an error

TypeError: Cannot read property 'pagination' of null(…)

in de getObjectValue function

if (typeof obj[key] != 'undefined' && obj[key] !== null) {

Maybe I am doing something wrong, if it works for you?

@ratiw ratiw reopened this Apr 28, 2016
@ratiw
Copy link
Owner

ratiw commented Apr 28, 2016

@jeroenherczeg Can you please put your code on gist or somewhere that I can have a look if you don't mind?

@midium
Copy link

midium commented Apr 29, 2016

I'm facing same issue. Anyway I also have problems with the data returned by my Laravel API call. Basically the table render with just written "No relevant data" but the function called return actually all the information required as json so I can't understand why it is not working.

@ratiw
Copy link
Owner

ratiw commented Apr 29, 2016

@midium The only problem I can think of is there might be some problem in mapping the pagination section of your JSON data structure to vuetable. Can you please show me your JSON data structure and <vuetable> tag that you use?

@mozami
Copy link
Collaborator

mozami commented Apr 29, 2016

@midium @jeroenherczeg Try adding pagination-path="" to your <vuetable> tag:

<vuetable
    api-url="/api/users"
    :fields="columnsToShow"
    :sort-order="sortOrder"
    :pagination-info-template="paginationInfoTemplate"
    pagination-path=""
></vuetable>

I've just started playing with this component, ran into the same issue and that fixed it for me.

@ratiw - thanks for sharing this, looks like a great lightweight and useful component!

@ratiw
Copy link
Owner

ratiw commented Apr 29, 2016

@midium @jeroenherczeg Please see more info on this section of Wiki Data Format.

@mozami - Glad you find it useful. But I think the documentation I put on Wiki pages might not be good enough. I'm really not a good writer. Thanks for helping out anyway. :)

@mozami
Copy link
Collaborator

mozami commented Apr 29, 2016

@ratiw Still figuring things out myself - if I do find anything I can improve, I will contribute

@midium
Copy link

midium commented May 2, 2016

@mozami I've tried your solution and at least now I see displaying 0 of 0 but anyway the data returned by the call to laravel is not empty, going to check better the data structure and in case will post it here.

Edit
sorry guys, it is just that I am an idiot. Basically the call made in laravel was not with paginate but with get. Once changed into paginate, the information returned are now correct and the component render properly. Thanks.

@ratiw
Copy link
Owner

ratiw commented May 2, 2016

@midium @mozami Thanks for the update. :) I'll probably wait a little bit before closing this issue.

@midium
Copy link

midium commented May 2, 2016

Would be nice if the component is able to understand if the data passed is with pagination or not, but maybe this is better to be kept as developer responsibility

@ratiw
Copy link
Owner

ratiw commented May 3, 2016

@midium In the next release, a warning will be dump to console if it cannot find the given pagination-path in the returned JSON.

@ratiw ratiw closed this as completed May 5, 2016
@SeoRoman
Copy link

just wanted to say thanks for this issue / resolve with pagination-path="" I was struggling because I really wanted to use this with Laravel and could not figure out why it wasn't working... it's great though! thanks!

@vernard
Copy link

vernard commented Aug 21, 2016

This also helped me. Most applications would return JSON rows of the records without having to provide info on pagination (pagination happens on client side in this case). But this module uses server side pagination.

I believe this should be noted in README.md. Most developers assume that the api-url will return the data rows without having pagination information (on the response).

mhuxain pushed a commit to mhuxain/vue-table that referenced this issue Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants