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 Order based on query, not alphabetical #21

Open
jschappet opened this issue Jan 4, 2019 · 1 comment
Open

Column Order based on query, not alphabetical #21

jschappet opened this issue Jan 4, 2019 · 1 comment

Comments

@jschappet
Copy link

Is it possible to have the Column order match the order in the JSON, instead of alphabetical?

@RobertoPrevato
Copy link
Owner

RobertoPrevato commented Jan 5, 2019

Hi @jschappet,
Please try the following: define a subclass of KingTable, overriding sortColumns function to do nothing. This function is called upon initialization, to apply the first order to the columns, here in code.

class YourKingTable extends KingTable {
    sortColumns() {
        return this;
    }
}

Then use your subclass.

You will still be able to set columns order by using the function setColumnsOrder. I didn't test but it should work, that is why I use the word "try".

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