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

Q-Table support to columns drag resizing #5115

Open
dariodepaolis opened this issue Sep 20, 2019 · 28 comments
Open

Q-Table support to columns drag resizing #5115

dariodepaolis opened this issue Sep 20, 2019 · 28 comments

Comments

@dariodepaolis
Copy link
Contributor

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I'd like to have a prop to enable the manual resize of column by user. (Like Grid component in ExtJS or Syncfusion)
Also a dblclick on the resizer the will expand to maximum width of the col will be awesome.

Describe alternatives you've considered
No alternative so far found, we have to manually rewrite the table header adding dragging function, auto-width, expand, ellipsis etc.

@rfox12
Copy link
Contributor

rfox12 commented Oct 11, 2019

+1. If Quasar is going to get serious about an improved data table (which I would love) I think perhaps we should have a holistic discussion. Potentially huge amounts of work.

@antonispat10
Copy link

Hello,

You could check my pull request #5460

@dariodepaolis
Copy link
Contributor Author

Great ty, asap I'll give it a try!

@rfox12
Copy link
Contributor

rfox12 commented Jan 3, 2020

This is more important now. User's expect columns to be able to be resized! Also need a nice / easy solution for truncating text. Some other thoughts...

  • set a minimum column size (entire table or per column). We don't want the user to make the column completely disappear unintentionally.

  • Have treatment options for text that is too long to fit in the cell (wrap text, use ellipses, or some "other" slot) AND be able to have variables that we can use to provide other UI actions (e.g. maybe I want to display a tooltip--but only if the text in that particular cell had to be truncated)

  • Sticky header and footer options without complicated CSS--to stay in effect if the QTable goes "fullscreen". I think having some caveats about browser support in the documentation would be ok...

  • Stretch goal... drag / reorder columns / rows

@satyavh
Copy link

satyavh commented Jun 4, 2020

We would also love this feature 👍

@bytebrain
Copy link

bytebrain commented Aug 29, 2020

I had same problem, now I use https://quasar.dev/vue-components/splitter instead of tables.

@Jokertwo
Copy link

I would like to ask about the status of this feature. Is there any progress?

@Jokertwo
Copy link

I would like to ask about the status of this feature. Is there any progress?

Or exist there some workaround on how to solve it?

@giftofsky
Copy link

Any update/solution on the issues? How can we raise the priority of this?

@Jokertwo
Copy link

I found one possible workaround for how to solve this issue. Example

@hawkeye64
Copy link
Member

It's a "work-in-progress" as a directive that will work on any table (QTable, QMarkupTable, etc) but here is a starting point. There are issues with context for this directive. The data should be attached to the element itself and retrieved from there. Right now, you could only have one directive going. Also, the created divs should be maintained, so they can be deleted if necessary.
Consider it a WIP. https://codepen.io/Hawkeye64/pen/dypyNWL

@giftofsky
Copy link

Many thanks @Jokertwo @hawkeye64. Tentatively, we'll try this while waiting Q-Table to fully support it ;)

@hawkeye64
Copy link
Member

I will work on my this coming week and see if I can't clean it up a bit. Consider it pre-alpha and should not be usedfor anything yet, other than testing purposes

@pdanpdan
Copy link
Collaborator

@hawkeye64
Copy link
Member

You know what, I had forgotten all about this. :(
Such is a busy life

@mikebrsv
Copy link

Any updates on that?
Or maybe there any any 3rd party modules to drag resizing (and, by any change, drag column reordering)?

@henryfool91
Copy link

Hey guys! Is there any plans for this, or there is no point to wait? No pressure, just wanna know :)

@hawkeye64
Copy link
Member

We're going to be starting a roadmap for Quasar v3. I will push to get this in, but no promises.

@goldenram
Copy link

Is there any update on this. I thought I could hack up a work around to this real easy, but since the sorting icon is adding at the end (or beginning (yuck)) of the header, the resize icon is inside the sorting icon. No way around this without templating the entire header. So, it would be great to have this in 2.x, unless we are close to v3. I really don't want to have to go back to ag-grid. :-)

@goldenram
Copy link

Or if there is way to keep the sorting icon always on the left side instead of it moving around based on how the text is aligning, then it would be easier to template this. But cannot figure out a way to do that either.

@wz5899
Copy link

wz5899 commented Jan 27, 2023

Here is a workaround for the sorting triggered by column resizing, based on hawkeye64's solution in https://codepen.io/Hawkeye64/pen/dypyNWL

In Class ResizableTable, set an indicator in the table for column resizing

onMouseDown(e) {
   ...
   this.table.colResizing = true;
}

In q-table, add a custom sort method :sort-method="customSort".
In "customSort" function, check the indicator. If true, ignore the sorting and clear the indicator.

const table = document.getElementById([your table id]).__tableResizable.table;
if (table.colResizing) {
    table.colResizing = false;
    // return rows unsorted
} else {
    // sort as usual
}

@kiranfenrir
Copy link

Is this still being investigated? We have an active request on our implementation for this.

@0xhellord
Copy link

Is it still WIP?

@hope-zjl
Copy link

hope-zjl commented Jul 4, 2023

Hello, please tell me, when the table appears horizontal scroll bar, this column dragging function is disabled, how should I solve it?

@neluckoff
Copy link

I know this problem is not solved yet, but maybe someone wants to share their working solution? The problem with @hawkeye64 and @Jokertwo solution is that with a large volume of table columns, they simply stop working. I want to make an implementation that will extend beyond the table in width and include overflows.

Maybe someone implemented this?

@agroebe
Copy link

agroebe commented Aug 2, 2023

Would love to see this get implemented. I think this deserves to be moved up in priority and I think lots of users kind of expect this convenience from a UI/UX perspective. For example, we have a lot of active discussions and an issue opened for this exact request.

@Daemach
Copy link

Daemach commented Nov 30, 2023

+1 - we have clients asking for this now.

@aleksmelnyk
Copy link

yep, agree, basic feature which is missing.

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

No branches or pull requests