Skip to content

Commit

Permalink
fix: remove container in table option
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Apr 1, 2024
1 parent 5993acd commit 80fb2c2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: remove container in table option",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
12 changes: 4 additions & 8 deletions packages/react-vtable/demo/src/event/event-rebind.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable no-undef */
/* eslint-disable no-console */
import { useState } from 'react';
import { useCallback, useState } from 'react';
import { ListTable } from '../../../src';

const App = () => {
const [transpose, setTranspose] = useState(false);
const [cell, setCell] = useState({});

const option = {
transpose,
Expand All @@ -30,6 +31,7 @@ const App = () => {
};

console.log('transpose:', transpose);
const handleCell = useCallback(args => setCell(args), []);
return (
<div>
<button
Expand All @@ -46,13 +48,7 @@ const App = () => {
>
get transpose
</button>
<ListTable
option={option}
height={'500px'}
onClickCell={() => {
console.log('onClickCell transpose', transpose);
}}
/>
<ListTable option={option} height={'500px'} onClickCell={handleCell} />
</div>
);
};
Expand Down
1 change: 0 additions & 1 deletion packages/vtable/src/core/BaseTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ export abstract class BaseTable extends EventTarget implements BaseTableAPI {
} = options;
this.container = container;
this.options = options;
this.options.container = container;
this._widthMode = widthMode;
this._heightMode = heightMode;
this._autoFillWidth = autoFillWidth;
Expand Down

0 comments on commit 80fb2c2

Please sign in to comment.