Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.24.0","mainProject":"@visactor/vtable","nextBump":"minor"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.25.0","mainProject":"@visactor/vtable","nextBump":"minor"}]
20 changes: 20 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# v1.24.0

2026-03-18


**🆕 New feature**

- **@visactor/vtable-gantt**: gantt weekend column width support setting
- **@visactor/vtable-sheet**: add undo/redo to sheet

**🐛 Bug fix**

- **@visactor/vtable**: groupBy with frozenColCount and enableTreeStickCell usage problem
- **@visactor/vtable**: when just has only one column groupTitle not show
- **@visactor/vtable**: checkbox cell render error when set groupBy with rowSeriesNumber



[more detail about v1.24.0](https://github.com/VisActor/VTable/releases/tag/v1.24.0)

# v1.23.3

2026-03-05
Expand Down
20 changes: 20 additions & 0 deletions docs/assets/changelog/zh/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# v1.24.0

2026-03-18


**🆕 新增功能**

- **@visactor/vtable-gantt**: 甘特图配置支持设置周末列宽度
- **@visactor/vtable-sheet**: 电子表格新增撤销/重做功能

**🐛 功能修复**

- **@visactor/vtable**: 修复 groupBy 分组表配合使用 frozenColCount 和 enableTreeStickCell 时滚动错位的问题
- **@visactor/vtable**: 修复当只有一列时,分组标题不显示问题
- **@visactor/vtable**: 修复当设置分组表时,复选框单元格渲染错误问题



[更多详情请查看 v1.24.0](https://github.com/VisActor/VTable/releases/tag/v1.24.0)

# v1.23.3

2026-03-05
Expand Down
77 changes: 77 additions & 0 deletions docs/assets/demo/en/gantt/gantt-locate-taskbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
category: examples
group: gantt
title: Task Bar Locate (Offscreen Indicator)
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-locate-taskbar.gif
link: gantt/Getting_Started
option: Gantt#taskBar
---

# Task Bar Locate (Offscreen Indicator)

When the timeline is long, task bars may be outside the current viewport. This demo shows how to enable the locate icon feature: when a task bar is horizontally outside the viewport, an icon is displayed at the left/right edge of the gantt view; hover highlights it, and click scrolls the task bar into view.

## Key Option

- `taskBar.locateIcon: true`

## Live Demo

```javascript livedemo template=vtable
// import * as VTableGantt from '@visactor/vtable-gantt';
let ganttInstance;

const records = [
{ id: 1, title: 'Offscreen on the left', start: '2024-02-05', end: '2024-02-20', progress: 20 },
{ id: 2, title: 'Offscreen on the left', start: '2024-03-10', end: '2024-03-18', progress: 60 },
{ id: 5, title: 'Visible in viewport', start: '2024-05-28', end: '2024-06-05', progress: 50 },
{ id: 3, title: 'Offscreen on the right', start: '2024-10-05', end: '2024-10-20', progress: 40 },
{ id: 4, title: 'Offscreen on the right', start: '2024-11-10', end: '2024-11-25', progress: 80 }
];

const columns = [
{ field: 'title', title: 'title', width: 160, sort: true },
{ field: 'start', title: 'start', width: 120, sort: true },
{ field: 'end', title: 'end', width: 120, sort: true },
{ field: 'progress', title: 'progress', width: 100, sort: true }
];

const option = {
records,
taskKeyField: 'id',
taskListTable: {
columns,
tableWidth: 280,
minTableWidth: 240,
maxTableWidth: 600
},
taskBar: {
startDateField: 'start',
endDateField: 'end',
progressField: 'progress',
locateIcon: true
},
minDate: '2024-01-01',
maxDate: '2024-12-31',
timelineHeader: {
colWidth: 30,
scales: [{ unit: 'day', step: 1 }]
},
scrollStyle: {
visible: 'scrolling'
},
grid: {
verticalLine: { lineWidth: 1, lineColor: '#e1e4e8' },
horizontalLine: { lineWidth: 1, lineColor: '#e1e4e8' }
}
};

ganttInstance = new VTableGantt.Gantt(document.getElementById(CONTAINER_ID), option);
window['ganttInstance'] = ganttInstance;

setTimeout(() => {
const x = ganttInstance.getXByTime(new Date('2024-06-01 00:00:00').getTime());
ganttInstance.scrollLeft = x;
}, 0);
```

62 changes: 62 additions & 0 deletions docs/assets/demo/en/interaction/scroll-frozen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
category: examples
group: Interaction
title: Scrollbars In Frozen Areas
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/scroll-frozen.gif
link: interaction/scroll-frozen
option: ListTable#scrollFrozenCols
---

# Scrollbars In Frozen Areas

This example shows horizontal scrolling inside frozen areas (both left and right) when the total width of frozen columns exceeds the maximum frozen width.

## Key Options

- `frozenColCount` / `rightFrozenColCount` set left/right frozen columns count
- `maxFrozenWidth` / `maxRightFrozenWidth` set the maximum frozen area width
- `scrollFrozenCols` / `scrollRightFrozenCols` enable horizontal scrolling inside frozen areas
- `theme.scrollStyle.visible` can be used to observe scrollbar visibility behavior across multiple scrollable regions (e.g. `scrolling` / `focus`)

## Code

```javascript livedemo template=vtable
let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json')
.then(res => res.json())
.then(data => {
const columns = [
{ field: 'Order ID', title: 'Order ID', width: 160 },
{ field: 'Customer ID', title: 'Customer ID', width: 160 },
{ field: 'Product Name', title: 'Product Name', width: 220 },
{ field: 'Category', title: 'Category', width: 140 },
{ field: 'Sub-Category', title: 'Sub-Category', width: 160 },
{ field: 'Region', title: 'Region', width: 120 },
{ field: 'City', title: 'City', width: 140 },
{ field: 'Order Date', title: 'Order Date', width: 140 },
{ field: 'Region', title: 'Region', width: 120 },
{ field: 'City', title: 'City', width: 140 },
{ field: 'Order Date', title: 'Order Date', width: 140 },
{ field: 'Quantity', title: 'Quantity', width: 120 },
{ field: 'Sales', title: 'Sales', width: 120 },
{ field: 'Profit', title: 'Profit', width: 120 },
{ field: 'Segment', title: 'Segment', width: 140 },
{ field: 'Ship Mode', title: 'Ship Mode', width: 140 }
];

const option = {
records: data,
columns,
widthMode: 'standard',
frozenColCount: 4,
rightFrozenColCount: 4,
maxFrozenWidth: 320,
maxRightFrozenWidth: 320,
scrollFrozenCols: true,
scrollRightFrozenCols: true,
overscrollBehavior: 'none'
};
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;
});
```
19 changes: 16 additions & 3 deletions docs/assets/demo/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@
"en": "Gantt Basic"
}
},
{
"path": "gantt-locate-taskbar",
"title": {
"zh": "任务条定位(超出可视区)",
"en": "Task Bar Locate"
}
},
{
"path": "gantt-customLayout",
"title": {
Expand Down Expand Up @@ -439,8 +446,7 @@
"zh": "甘特图缩放滚动条",
"en": "Gantt DataZoomAxis Scrollbar"
}
}
,
},
{
"path": "gantt-baseline",
"title": {
Expand Down Expand Up @@ -920,6 +926,13 @@
"en": "scroll"
}
},
{
"path": "scroll-frozen",
"title": {
"zh": "冻结区可滚动",
"en": "Scroll frozen area"
}
},
{
"path": "arrowkeys-move-select",
"title": {
Expand Down Expand Up @@ -1845,4 +1858,4 @@
]
}
]
}
}
77 changes: 77 additions & 0 deletions docs/assets/demo/zh/gantt/gantt-locate-taskbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
category: examples
group: gantt
title: 甘特图任务条定位(超出可视区提示)
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/gantt/gantt-locate-taskbar.gif
link: gantt/Getting_Started
option: Gantt#taskBar
---

# 甘特图任务条定位(超出可视区提示)

当时间轴很长时,任务条可能不在当前可视区域内。本示例展示如何开启定位图标能力:当任务条横向超出可视区域时,在甘特图左右边缘显示定位图标;鼠标 hover 会高亮,点击后会自动滚动将任务条带入可视区域。

## 关键配置

- `taskBar.locateIcon: true`

## 代码演示

```javascript livedemo template=vtable
// import * as VTableGantt from '@visactor/vtable-gantt';
let ganttInstance;

const records = [
{ id: 1, title: '任务条在左侧不可见', start: '2024-02-05', end: '2024-02-20', progress: 20 },
{ id: 2, title: '任务条在左侧不可见', start: '2024-03-10', end: '2024-03-18', progress: 60 },
{ id: 5, title: '任务条在可见区', start: '2024-05-28', end: '2024-06-05', progress: 50 },
{ id: 3, title: '任务条在右侧不可见', start: '2024-10-05', end: '2024-10-20', progress: 40 },
{ id: 4, title: '任务条在右侧不可见', start: '2024-11-10', end: '2024-11-25', progress: 80 }
];

const columns = [
{ field: 'title', title: 'title', width: 160, sort: true },
{ field: 'start', title: 'start', width: 120, sort: true },
{ field: 'end', title: 'end', width: 120, sort: true },
{ field: 'progress', title: 'progress', width: 100, sort: true }
];

const option = {
records,
taskKeyField: 'id',
taskListTable: {
columns,
tableWidth: 280,
minTableWidth: 240,
maxTableWidth: 600
},
taskBar: {
startDateField: 'start',
endDateField: 'end',
progressField: 'progress',
locateIcon: true
},
minDate: '2024-01-01',
maxDate: '2024-12-31',
timelineHeader: {
colWidth: 30,
scales: [{ unit: 'day', step: 1 }]
},
scrollStyle: {
visible: 'scrolling'
},
grid: {
verticalLine: { lineWidth: 1, lineColor: '#e1e4e8' },
horizontalLine: { lineWidth: 1, lineColor: '#e1e4e8' }
}
};

ganttInstance = new VTableGantt.Gantt(document.getElementById(CONTAINER_ID), option);
window['ganttInstance'] = ganttInstance;

setTimeout(() => {
const x = ganttInstance.getXByTime(new Date('2024-06-01 00:00:00').getTime());
ganttInstance.scrollLeft = x;
}, 0);
```

62 changes: 62 additions & 0 deletions docs/assets/demo/zh/interaction/scroll-frozen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
category: examples
group: Interaction
title: 冻结区域滚动条
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/scroll-frozen.gif
link: interaction/scroll-frozen
option: ListTable#scrollFrozenCols
---

# 冻结区域滚动条

该示例展示了当冻结区域的列宽总和超过最大冻结宽度时,开启冻结区域内部横向滚动的效果(左冻结与右冻结)。

## 关键配置

- `frozenColCount` / `rightFrozenColCount` 设置左右冻结列数
- `maxFrozenWidth` / `maxRightFrozenWidth` 设置左右冻结区域最大宽度
- `scrollFrozenCols` / `scrollRightFrozenCols` 开启冻结区域内部横向滚动
- `theme.scrollStyle.visible` 可配合观察滚动条在多滚动区域下的显隐行为(如 `scrolling` / `focus`)

## 代码演示

```javascript livedemo template=vtable
let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json')
.then(res => res.json())
.then(data => {
const columns = [
{ field: 'Order ID', title: 'Order ID', width: 160 },
{ field: 'Customer ID', title: 'Customer ID', width: 160 },
{ field: 'Product Name', title: 'Product Name', width: 220 },
{ field: 'Category', title: 'Category', width: 140 },
{ field: 'Sub-Category', title: 'Sub-Category', width: 160 },
{ field: 'Region', title: 'Region', width: 120 },
{ field: 'City', title: 'City', width: 140 },
{ field: 'Order Date', title: 'Order Date', width: 140 },
{ field: 'Region', title: 'Region', width: 120 },
{ field: 'City', title: 'City', width: 140 },
{ field: 'Order Date', title: 'Order Date', width: 140 },
{ field: 'Quantity', title: 'Quantity', width: 120 },
{ field: 'Sales', title: 'Sales', width: 120 },
{ field: 'Profit', title: 'Profit', width: 120 },
{ field: 'Segment', title: 'Segment', width: 140 },
{ field: 'Ship Mode', title: 'Ship Mode', width: 140 }
];

const option = {
records: data,
columns,
widthMode: 'standard',
frozenColCount: 4,
rightFrozenColCount: 4,
maxFrozenWidth: 320,
maxRightFrozenWidth: 320,
scrollFrozenCols: true,
scrollRightFrozenCols: true,
overscrollBehavior: 'none'
};
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
window['tableInstance'] = tableInstance;
});
```
Loading
Loading