Skip to content

Commit

Permalink
docs: supplement event change_header_position_fail and start
Browse files Browse the repository at this point in the history
  • Loading branch information
fangsmile committed Nov 13, 2024
1 parent 2a21905 commit abde088
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/assets/guide/en/Developer_Ecology/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ return (
</PivotTable>
);
```

Grammatical label demo: [PivotTable demo](../../demo-react/grammatical-tag/pivot-table) [PivotChart demo](../../demo-react/grammatical-tag/pivot-chart)

#### Components outside the table
Expand Down Expand Up @@ -220,6 +221,8 @@ interface EventsProps {
onResizeColumn?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column']>;
onResizeColumnEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column_end']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;
onFreezeClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['freeze_click']>;
onScroll?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll']>;
Expand Down Expand Up @@ -290,4 +293,4 @@ import VChart from '@visactor/vchart';
register.chartModule('vchart', VChart);

// ......
```
```
2 changes: 2 additions & 0 deletions docs/assets/guide/en/Developer_Ecology/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ interface EventsProps {
onResizeColumn?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column']>;
onResizeColumnEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column_end']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;
onFreezeClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['freeze_click']>;
onScroll?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll']>;
Expand Down
6 changes: 4 additions & 2 deletions docs/assets/guide/zh/Developer_Ecology/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ interface EventsProps {
onResizeColumn?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column']>;
onResizeColumnEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column_end']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;
onFreezeClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['freeze_click']>;
onScroll?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll']>;
Expand Down Expand Up @@ -283,7 +285,7 @@ function App() {

### register

在VTable中,图表、编辑器等组件需要通过resigister方法注册,才能正常使用;在React-VTable中,暴露了相应的register方法,可以直接使用。
在 VTable 中,图表、编辑器等组件需要通过 resigister 方法注册,才能正常使用;在 React-VTable 中,暴露了相应的 register 方法,可以直接使用。

```jsx
import { register } from '@visactor/react-vtable';
Expand All @@ -292,4 +294,4 @@ import VChart from '@visactor/vchart';
register.chartModule('vchart', VChart);

// ......
```
```
2 changes: 2 additions & 0 deletions docs/assets/guide/zh/Developer_Ecology/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ interface EventsProps {
onResizeColumn?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column']>;
onResizeColumnEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column_end']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;
onFreezeClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['freeze_click']>;
onScroll?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll']>;
Expand Down
2 changes: 2 additions & 0 deletions packages/react-vtable/src/eventsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface EventsProps {
onResizeRowEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_row_end']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;

onAfterSort?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['after_sort']>;
Expand Down Expand Up @@ -105,6 +106,7 @@ export const TABLE_EVENTS = {
onResizeRowEnd: EVENT_TYPE.RESIZE_ROW_END,
onChangeHeaderPositionStart: EVENT_TYPE.CHANGE_HEADER_POSITION_START,
onChangeHeaderPosition: EVENT_TYPE.CHANGE_HEADER_POSITION,
onChangeHeaderPositionFail: EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL,
onSortClick: EVENT_TYPE.SORT_CLICK,

onAfterSort: EVENT_TYPE.AFTER_SORT,
Expand Down
4 changes: 4 additions & 0 deletions packages/vue-vtable/src/eventsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export interface EventsProps {
onResizeColumn?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column']>;
onResizeColumnEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['resize_column_end']>;
onChangeHeaderPosition?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position']>;
onChangeHeaderPositionStart?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_start']>;
onChangeHeaderPositionFail?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_header_position_fail']>;
onSortClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['sort_click']>;
onFreezeClick?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['freeze_click']>;
onScroll?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll']>;
Expand Down Expand Up @@ -90,6 +92,8 @@ export const TABLE_EVENTS = {
onResizeColumn: EVENT_TYPE.RESIZE_COLUMN,
onResizeColumnEnd: EVENT_TYPE.RESIZE_COLUMN_END,
onChangeHeaderPosition: EVENT_TYPE.CHANGE_HEADER_POSITION,
onChangeHeaderPositionStart: EVENT_TYPE.CHANGE_HEADER_POSITION_START,
onChangeHeaderPositionFail: EVENT_TYPE.CHANGE_HEADER_POSITION_FAIL,
onSortClick: EVENT_TYPE.SORT_CLICK,
onFreezeClick: EVENT_TYPE.FREEZE_CLICK,
onScroll: EVENT_TYPE.SCROLL,
Expand Down

0 comments on commit abde088

Please sign in to comment.