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

Data is not parsed #53

Open
usfalami opened this issue Feb 9, 2016 · 0 comments
Open

Data is not parsed #53

usfalami opened this issue Feb 9, 2016 · 0 comments

Comments

@usfalami
Copy link

usfalami commented Feb 9, 2016

Ajax doesnt work cause data received from server is not parsed.

ajaxLookup: function (data) {
var items;

        this.ajaxToggleLoadClass(false);

        if (!this.ajax.xhr) return;

        if (this.ajax.preProcess) {
            data = this.ajax.preProcess(data);
        }

        // Save for selection retreival
        this.ajax.data = data; // data must be parse as JSON => JSON.parse(data);

        items = this.grepper(this.ajax.data);

        if (!items || !items.length) {
            return this.shown ? this.hide() : this;
        }

        this.ajax.xhr = null;

        return this.render(items.slice(0, this.options.items)).show();
    },
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

1 participant