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

Can't reset the sorting of the table component #865

Open
theonelucas opened this issue Mar 25, 2024 · 1 comment
Open

Can't reset the sorting of the table component #865

theonelucas opened this issue Mar 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@theonelucas
Copy link

theonelucas commented Mar 25, 2024

Oruga version: latest
Vuejs version: latest

Description

In the vue2 version of Oruga, we could set the currently sorted column of a table by setting a reference to the <o-table /> component and mutating the prop currentSortColumn, eg.:

tableReference.value.currentSortColumn = {};

However, in the latest Oruga version (vue 3 / oruga 0.8.6), the <o-table /> component no longer exposes that prop, and the only prop remotely similar to that is the defaultSort, which is not two-way data bonded.

A two-way data bound prop or a method to change/reset the sorted column is desirable, as in our app we could reset the currently applied sorting, which now in the latest version no longer works.

@theonelucas theonelucas changed the title o-table backend sorting not being shown Can't reset the sorting of the table component Mar 25, 2024
@mlmoravek
Copy link
Member

@theonelucas Thanks to open this discussion. Fyi, we switched from 0.8 to the composition api. A component written with <script setup> are closed by default, so you can't access internal data attributes and function anymore like component written with the option api before.

However, I will have a look at how we can provide a way to update the surrentSortColumn programmatically.

@mlmoravek mlmoravek added the enhancement New feature or request label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants