Skip to content

Data is not parsed #53

@usfalami

Description

@usfalami

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();
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions