-
Notifications
You must be signed in to change notification settings - Fork 742
feat(Table): column resizing #4110
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
Open
J-Michalek
wants to merge
53
commits into
nuxt:v3
Choose a base branch
from
J-Michalek:feat/table-column-resize
base: v3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
09a6914
feat(stepper): add iconClass prop to stepper items
J-Michalek 9124f12
test(stepper): add case for iconClass prop
J-Michalek 1b906b5
docs(stepper): add iconClass prop
J-Michalek 9902987
test(stepper): remove obsolete snapshot entry
J-Michalek 16c68c7
test(stepper): update snapshot for vue tests
J-Michalek 7331409
Merge branch 'nuxt:v3' into feat/stepper-icon-class
J-Michalek 1197806
feat(accordion): add ui field in items
J-Michalek 7c7a6f8
Merge branch 'feat/stepper-icon-class' of https://github.com/J-Michalβ¦
J-Michalek 2145147
test(accordion): add new snapshot entry for vue tests
J-Michalek 161b2ba
docs(accordion): add ui field in items
J-Michalek 4c8f564
feat(tabs): add ui field on items
J-Michalek 31153d3
docs(tabs): add ui field on items
J-Michalek cac3e20
test(tabs): add ui field on items
J-Michalek 47ae811
feat(stepper): add ui field on items
b3feac5
test(stepper): add ui field on items
c1ab96e
docs(stepper): add ui field on items
11daf42
feat(breadcrumb): add ui field on items
66a79a0
test(breadcrumb): add ui field on items
473b0b7
docs(breadcrumb): add ui field on items
9a4043e
feat(checkbox-group): add ui field on items
0feed77
test(checkbox-group): add ui field on items
591be49
docs(checkbox-group): add ui field on items
b3c19fa
docs(breadcrumb): fix description for object type
9ac59b5
feat(radio-group): add ui field on items
69a36a4
test(radio-group): add ui field on items
3402866
docs(radio-group): add ui field on items
824cecd
feat(input-menu): add ui field on items
402f06c
test(input-menu): add ui field on items
96d521a
docs(input-menu): add ui field on items
4269961
feat(tree): add ui field on items
68d04b1
test(tree): add ui field on items
ec91d84
docs(tree): add ui field on items
873de68
feat(table): column resizing WIP
J-Michalek b528214
feat(table): set default for columnResizeMode
J-Michalek 9352b2c
feat(table-theme): adjust size and posizitoning of resize handle
J-Michalek 03ca035
chore(table): enable resizing in table playground
J-Michalek cc49cab
docs(table): example of column resizing WIP
J-Michalek c68dbba
Merge branch 'nuxt:v3' into feat/table-column-resize
J-Michalek 4a2f5bb
refactor(table): enable column resizing through columnSizingOptions
J-Michalek ddd3643
fix(table): enable column resizing through columnSizingOptions
J-Michalek baf34b2
chore(table): remove debugging leftover
J-Michalek cafda53
refactor(table-theme): the after element made it impossible for the tβ¦
J-Michalek 04fd5e2
fix(table): always set header width when table is resizable
J-Michalek bcc8514
style(table): adjust resizeHandle styles
J-Michalek feb4d08
Merge branch 'feat/table-column-resize' of https://github.com/J-Michaβ¦
b2e84d7
feat(table): implement fit and expand resize modes
813d674
test(table): update snapshots
J-Michalek e9fd8c0
refactor(table): declutter template from sizing styles
J-Michalek b5d915f
Merge branch 'v3' of https://github.com/J-Michalek/ui into feat/tableβ¦
6393da5
Merge branch 'feat/table-column-resize' of https://github.com/J-Michaβ¦
f911fc4
Merge branch 'v3' of https://github.com/J-Michalek/ui into feat/tableβ¦
9675d01
chore: resolve badly merged changes
d0963f6
Merge branch 'feat/table-column-resize' of https://github.com/J-Michaβ¦
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
docs/app/components/content/examples/table/TableResizingExample.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<script setup lang="ts"> | ||
import type { TableColumn } from '@nuxt/ui' | ||
|
||
interface User { | ||
id: number | ||
name: string | ||
position: string | ||
email: string | ||
role: string | ||
} | ||
|
||
const data = ref<User[]>([{ | ||
id: 1, | ||
name: 'Lindsay Walton', | ||
position: 'Front-end Developer', | ||
email: '[email protected]', | ||
role: 'Member' | ||
}, { | ||
id: 2, | ||
name: 'Courtney Henry', | ||
position: 'Designer', | ||
email: '[email protected]', | ||
role: 'Admin' | ||
}, { | ||
id: 3, | ||
name: 'Tom Cook', | ||
position: 'Director of Product', | ||
email: '[email protected]', | ||
role: 'Member' | ||
}, { | ||
id: 4, | ||
name: 'Whitney Francis', | ||
position: 'Copywriter', | ||
email: '[email protected]', | ||
role: 'Admin' | ||
}, { | ||
id: 5, | ||
name: 'Leonard Krasner', | ||
position: 'Senior Designer', | ||
email: '[email protected]', | ||
role: 'Owner' | ||
}, { | ||
id: 6, | ||
name: 'Floyd Miles', | ||
position: 'Principal Designer', | ||
email: '[email protected]', | ||
role: 'Member' | ||
}]) | ||
|
||
const columns: TableColumn<User>[] = [{ | ||
accessorKey: 'id', | ||
header: 'ID', | ||
minSize: 200, | ||
size: 300, | ||
maxSize: 500 | ||
}, { | ||
accessorKey: 'name', | ||
header: 'Name', | ||
maxSize: 200 | ||
}, { | ||
accessorKey: 'email', | ||
header: 'Email', | ||
minSize: 225 | ||
}, { | ||
accessorKey: 'role', | ||
header: 'Role' | ||
}, { | ||
id: 'action' | ||
}] | ||
</script> | ||
|
||
<template> | ||
<UTable :data="data" :columns="columns" :column-sizing-options="{ enableColumnResizing: true }" class="flex-1" sticky /> | ||
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@J-Michalek This is a lie, current default is 'expand'.