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

[Search] Allow custom display fields #2645

Closed
wants to merge 1 commit into from

Commits on Jul 15, 2015

  1. Update search.js to allow custom display fields

    This change allow the developter to choose the field to display in the results. So we don't have to change our json's object field names to the fixed ones (title, price and description).
    usage:
    
    $('div[name="searchDiv"]').search({
                source: [{id:0, myfield: 'some text', extrafield: 'ST'}, {id:1, myfield: 'another text', extrafield: 'AT'}],
                searchFields: [
                    myfield
                ],
                displayField: extrafield
            });
    anibalmf1 committed Jul 15, 2015
    Configuration menu
    Copy the full SHA
    0119240 View commit details
    Browse the repository at this point in the history