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

Column Sort bug in Chrome #140

Closed
aceberg opened this issue Sep 24, 2024 · 2 comments
Closed

Column Sort bug in Chrome #140

aceberg opened this issue Sep 24, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@aceberg
Copy link
Owner

aceberg commented Sep 24, 2024

This seems to work in Firefox but not in Chrome for me. Not sure if this is known (or if its just my browser). Not a huge deal but wanted to make you aware.

Originally posted by @rw377 in #87 (comment)

@aceberg aceberg added bug Something isn't working help wanted Extra attention is needed labels Sep 24, 2024
@gabrielwhite
Copy link

I am also having this issue in Brave / Chrome (MacOS) - cannot sort columns.

@gabrielwhite
Copy link

Update: I think the issue is somewhere in the JavaScript code here that handles sorting. The IP sorting column works, but none of the others do.

function sortByAny(someArray) {

    if (field == 'IP') {
        someArray.sort((a, b) => sortIP(a, b, down));
    } else {
        someArray.sort((a, b) => byField(a, b, field, down));
    }

    displayArrayData(someArray);
}

function byField(a, b, fieldName, down){
    if (a[fieldName] > b[fieldName]) {
        return down;
    } else {
        return !down;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants