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

Table backend-sorting resetting sorted column #30

Closed
kieusonlam opened this issue Apr 20, 2017 · 1 comment
Closed

Table backend-sorting resetting sorted column #30

kieusonlam opened this issue Apr 20, 2017 · 1 comment
Labels

Comments

@kieusonlam
Copy link

I'm not quire sure if I do it wrong. When enable backend-sorting this mean I click on table header to sort, I also reload data for the table right? So here is my sort method to fetch data from the backend.

sorted(field, order) {
    this.$store.dispatch('FETCH_ARTICLES', {
        sort: {
            field,
            order: (order === 'asc') ? 1 : -1
        }
    })
}

But the problem when reload data, table seem to be losing current state of ordering, so it always be ascending when I click on it.

image

Am I do it the wrong way?

@rafaberaldo
Copy link
Member

Gonna take a look at it

@rafaberaldo rafaberaldo changed the title Need a bit help about Table backend-sorting Table backend-sorting resetting sorted column Apr 20, 2017
rafaberaldo added a commit that referenced this issue Apr 20, 2017
kikuomax added a commit to kikuomax/buefy that referenced this issue Aug 29, 2023
…on" (buefy#28) (buefy#30)

* fix(lib): crash of empty BNavbar

- Fixes the bug where an empty `BNavbar` crashed with "TypeError:
  this.$slots.brand is not a function". Checks if `this.$slots.brand` is
  not nullish before calling it.

issue ntohq#28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants