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

Exporting FOOTER in csv with customFunction behaviour is broken!!! #1811

Open
AndraPanait opened this issue Aug 29, 2023 · 0 comments
Open
Assignees

Comments

@AndraPanait
Copy link

BUG description:

  • if you have a function added inside the footer of one column : and you have just a couple of visible columns defined, the export of the csv footer is broken, i ll paste the code and tell you what the problem is!
    inside exporter.js you have this code for footer:
    if (!ignoreFooter) {
    content += '\n';
    content += visibleColumns.map(function (m, i) {
    if (typeof m.footer === 'function') {
    var columnData = _.pluck(data, columns[i].dataField);
    return '"' + m.footer(columnData, columns[i], i) + '"';
    } else if (m.footerFormatter) {
    return '"' + m.footerFormatter(columns[i], i) + '"';
    }
    return '"' + m.footer + '"';
    }).join(separator);
    }

what happens if visibleColums length is 7 and columns 10 for example?
columns[i] will be completely broken so ...all the code inside this function should be based on visibleColumns not on columns

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