quasar icon indicating copy to clipboard operation
quasar copied to clipboard

feat: Add resizing for QTable Columns: Issue #5115

Open Beanminchild opened this issue 10 months ago • 9 comments

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [X] Feature
  • [ ] Documentation
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Build-related changes
  • [ ] Other, please describe:

Does this PR introduce a breaking change?

  • [ ] Yes
  • [X] No

The PR fulfills these requirements:

  • [X] It's submitted to the dev branch (or v[X] branch)
  • [X] When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • [ ] It's been tested on a Cordova (iOS, Android) app
  • [ ] It's been tested on an Electron app
  • [ ] Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • [X] Addressing open issue https://github.com/quasarframework/quasar/issues/5115 // This small update adds a prop for a user resizable columns for the Qtable component.

Other information: I am excited to submit this pull request, which introduces a feature that has been highly requested by the community, including myself. This is my first contribution to the project, and I have designed the component to be highly customizable to accommodate various use cases.

I welcome any feedback or suggestions for improvements, and I am open to making any necessary adjustments to ensure it aligns with the project's standards and goals.

Thank you for considering my contribution!

// Example Photos from test app used to verify functionality

image image

Example table with one resizable column: image

Beanminchild avatar Feb 17 '25 23:02 Beanminchild

Can I get a review on this please?

Beanminchild avatar Feb 22 '25 17:02 Beanminchild

You mixed

  • 4 space indent with the existing 2 space indent
  • options API with the existing composition API
  • semicolons in SASS

This change would also require to add the description of the added things in the API description JSON

If you want a review on code please change the PR so that it matches the existing code.

pdanpdan avatar Feb 24 '25 13:02 pdanpdan

I'll work on that thank you for the feedback :)

Beanminchild avatar Feb 24 '25 13:02 Beanminchild

hey @pdanpdan sorry to ask but could you tell me where the api description json is?

So far i cleaned up most of what you wanted and added ability to use column definitions to specify which columns are resizable. Also made it so you can double click the grabbers to make the columns go back to their default size.

Still need to clean up code a bit and add the description of the new functionality to the api description json.

Beanminchild avatar Feb 27 '25 21:02 Beanminchild

https://github.com/quasarframework/quasar/blob/dev/ui/src/components/table/QTable.json

pdanpdan avatar Feb 27 '25 21:02 pdanpdan

https://github.com/quasarframework/quasar/blob/dev/ui/src/components/table/QTable.json

thank you very much

Beanminchild avatar Feb 27 '25 21:02 Beanminchild

Hello. Any news on this ? Looking forward to see it integrated

pintaf avatar May 06 '25 21:05 pintaf

Hi. I'm looking forward too. @pdanpdan do you have any updates?

vadim-popa avatar May 14 '25 06:05 vadim-popa

I would like this feature too, but it's clearly not good enough yet to be reviewed. I did a little cleanup in my own branch here that you can review. https://github.com/timbze/quasar/commit/255381712e3a68bb87f1d8414d2efab97c828e38

One rule of PRs for good code is not to change any existing code that is not related to your PR. Your PR changes a lot of spacing, adding semi-colons etc. I know it's probably your IDE or AI that did it, but still you need to review it and not submit anything that is not related to your changes.

One of the reasons why I know this won't be accepted yet is the manual 150 width that you add on mount. I don't have enough time to figure out how to do it correctly but IMHO this is clearly not it. Likely you should not add onMounted at all.

timbze avatar Aug 12 '25 14:08 timbze