-
+
}
```
@@ -1590,6 +1602,11 @@ export default defineComponent({
{ label: 'Description', key: 'description', sortable: true },
{ label: 'Enabled', key: 'enabled', sortable: false }
],
+ resizeHeaders: [
+ { label: 'Name', key: 'name' },
+ { label: 'ID', key: 'id' },
+ { label: 'Enabled', key: 'enabled' },
+ ],
tableOptionsHeaders: [
{ label: 'Name', key: 'name' },
{ label: 'ID', key: 'id' },
diff --git a/sandbox/pages/SandboxTable.vue b/sandbox/pages/SandboxTable.vue
index 7d9801fc04..3d680df0cc 100644
--- a/sandbox/pages/SandboxTable.vue
+++ b/sandbox/pages/SandboxTable.vue
@@ -29,6 +29,7 @@
:initial-fetcher-params="{
pageSize: 30
}"
+ resize-columns
>
diff --git a/src/components/KTable/KTable.cy.ts b/src/components/KTable/KTable.cy.ts
index 3dba9bc33c..380beaf603 100644
--- a/src/components/KTable/KTable.cy.ts
+++ b/src/components/KTable/KTable.cy.ts
@@ -237,6 +237,20 @@ describe('KTable', () => {
cy.get('.k-table').should('have.class', 'has-hover')
})
+
+ it('renders column resize toggles when resizeColumns is set', () => {
+ mount(KTable, {
+ props: {
+ testMode: 'true',
+ headers: options.headers,
+ fetcher: () => { return { data: options.data } },
+ resizeColumns: true,
+ },
+ })
+
+ cy.get('.k-table').find('th.resizable').should('be.visible')
+ cy.get('.resize-handle').should('exist')
+ })
})
describe('data revalidates and changes as expected', () => {
@@ -276,7 +290,6 @@ describe('KTable', () => {
fetcher: offsetPaginationFetcher,
isLoading: false,
headers: offsetPaginationHeaders,
- offset: true,
},
})
@@ -570,7 +583,6 @@ describe('KTable', () => {
paginationPageSizes: [10, 15, 20],
hidePaginationWhenOptional: true,
initialFetcherParams: { offset: null },
- offset: true,
cacheIdentifier: 'offset-pagination',
},
})
@@ -590,7 +602,6 @@ describe('KTable', () => {
headers: options.headers,
paginationPageSizes: [10, 15, 20],
hidePaginationWhenOptional: true,
- offset: true,
},
})
@@ -617,7 +628,6 @@ describe('KTable', () => {
headers: options.headers,
paginationPageSizes: [10, 15, 20],
hidePaginationWhenOptional: true,
- offset: true,
searchInput: '',
cacheIdentifier: 'search-example',
},
diff --git a/src/components/KTable/KTable.vue b/src/components/KTable/KTable.vue
index 32de3168b5..75b66749c1 100644
--- a/src/components/KTable/KTable.vue
+++ b/src/components/KTable/KTable.vue
@@ -73,90 +73,125 @@
-