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

[atable] Make resizable columns a column-schema change #194

Open
agritheory opened this issue Nov 23, 2024 · 2 comments · May be fixed by #196
Open

[atable] Make resizable columns a column-schema change #194

agritheory opened this issue Nov 23, 2024 · 2 comments · May be fixed by #196
Assignees

Comments

@agritheory
Copy link
Owner

    {
		label: 'Group | Item',
		name: 'item_code',
		edit: false,
		width: '50ch',
		type: 'Data',
		align: 'left',
		pinned: true,
		resizeable: true,
    }

I think the most appropriate strategy for this is to add the resize styles on the the element and then emit on resize modifying the column width to match: https://vueuse.org/core/useResizeObserver/

@Alchez
Copy link
Collaborator

Alchez commented Nov 25, 2024

@agritheory I think I'll need help with the resizing styles, and I can then take over for the resizing handler. I tried adding resize: horizontal to a bunch of places in the table, but I couldn't get the header columns to allow resizing.

@agritheory
Copy link
Owner Author

agritheory commented Nov 25, 2024

resize: horizontal requires that overflow be set to something other than hidden. I couldn't find this call out in the MDN docs but I saw it as a comment in the CSS when editing it directly. The three CSS attributes that Devarsh had in the original work are all required for it to work correctly.

@Alchez Alchez linked a pull request Nov 27, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants