Lola

Laravel Datatable sort for data from Ajax call

Posted 8 months ago by Lola

Hello, I need a help, some advice to orientated

I have some data on my page, the best way (oriented on design) is using a table structure

 smth like this

    <table>
        <thead>
            <th><td>.Name</td></th>
            <th><td>...</td></th>
            <th><td>...</td></th>
        </thead>
        <tbody>
                <tr><td>...</td></tr>
            <tr><td>...</td></tr>
            <tr><td>...</td></tr>
        </tbody>
    </table>

Also, I have some load button

    <div> Load More </div>

When I click on it I get the next data's that I need to show from my table

I implement datatables, but when I click on datatbles sort after clicking "Load More" button , I loose data that I get from my ajax call.

What I can do? At this moment, I have only one idea, to write some custom order...

but the perfect way I think is datatable using... So I need to find the best way to solve this problem... Please help me to find some good decision.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.