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

After ajax update dynatable duplicate it's controls. #291

Open
B-R-Bender opened this issue Nov 29, 2017 · 1 comment
Open

After ajax update dynatable duplicate it's controls. #291

B-R-Bender opened this issue Nov 29, 2017 · 1 comment

Comments

@B-R-Bender
Copy link

B-R-Bender commented Nov 29, 2017

Hi! Thank for awsome tool!

when table loads for the firs time it looks fine, but when it updates controlls starts duplicatin each time after

    <div id="workersTab">
        <table id="workersTable" class="table">
            <thead>
            <tr>
                <th data-dynatable-column="id">Worker</th>
                <th data-dynatable-column="lastShare">Last Share</th>
                <th data-dynatable-column="rating">Rating</th>
                <th data-dynatable-column="hashrate">Hashrate</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

    <div id="calculatorTab">
        <table id="calculatorTable" class="table">
            <thead>
            <tr>
                <th data-dynatable-column="period">Period</th>
                <th data-dynatable-column="coins">ETH</th>
                <th data-dynatable-column="bitcoins">BTC</th>
                <th data-dynatable-column="dollars">USD</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>

and this calls after ajax update

        convertWorkersData(responseData);
        var workersTable = $('#workersTable').dynatable({
            dataset: {
                records: responseData
            },
            features: {
                paginate: true,
                recordCount: false,
                search: false
            }
        }).data("dynatable");
        workersTable.settings.dataset.originalRecords = responseData;
        workersTable.process();

this issue only for firefox(55.0.1) and ie (11.0.9600.18378)
chrome(62.0.3202.94) and opera(49.0.2725.47) works fine

it's looks loke this:
http://puu.sh/yvQvj/c1222525ed.png
http://puu.sh/yvQwc/14d8498b08.png

any suggestion?

@setsune
Copy link

setsune commented Dec 5, 2017

Hello!

I believe it's because you're loading the features:object data after the ajax update again, which is causing the duplication of the controls.

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

2 participants