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

Handle sort column #160

Open
ChahinDB7 opened this issue Feb 10, 2023 · 1 comment
Open

Handle sort column #160

ChahinDB7 opened this issue Feb 10, 2023 · 1 comment

Comments

@ChahinDB7
Copy link

Development Relevant Information:

  • BalmUI version: 8.57.0
  • Browser: Chrome
  • Operating System: Windows 11

I have my thread as follows

thead: [{
    value: 'Contract',
    sort: 'asc',
    align: 'left',
    columnId: 'Symbol',
    class: 'bold'
  }, {
    value: 'Side',
    sort: 'asc',
    columnId: 'Direction',
    class: 'bold'
  }
]

and my tbody like this

tbody: [ {
    field: 'Symbol',
    fn: data => {
      return data.Symbol
    }
  }, {
    field: 'Direction',
    fn: data => {
      return data.Direction
    }
  }

As you see I have on thead every column a sort 'asc' because I want every column to be sorted as asc desc. What I want to know is how javascript could know which column is currently sorted on. Example user pressed on the head on the column Direction even though I know the BalmUI handles all the sorting I myself want to know which is currently sorted on.

Also is there a way to programmically to reset/set the current sort?

elf-mouse added a commit that referenced this issue Feb 15, 2023
@elf-mouse
Copy link
Member

Hi @DevChahinAarbiou , you can use new event sorted to getting more info in v8.58.0

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