Skip to content

Commit 957f125

Browse files
Fix setProps bug (#59)
* Fix setProps bug * bump version
1 parent 0e2aa81 commit 957f125

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

packages/dash-table/dash_table/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/demo.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-table",
3-
"version": "3.0.0rc7",
3+
"version": "3.0.0rc8",
44
"description": "Dash table",
55
"main": "build/index.js",
66
"scripts": {

packages/dash-table/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-table",
3-
"version": "3.0.0rc7",
3+
"version": "3.0.0rc8",
44
"description": "Dash table",
55
"main": "build/index.js",
66
"scripts": {

packages/dash-table/src/dash-table/components/Table/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React, {Component} from 'react';
1+
import React, { Component } from 'react';
22
import * as R from 'ramda';
33

44
import { memoizeOne } from 'core/memoizer';
55

66
import VirtualizationFactory from 'dash-table/virtualization/Factory';
77

88
import ControlledTable from 'dash-table/components/ControlledTable';
9-
import { PropsWithDefaults } from './props';
9+
import { PropsWithDefaults, SetProps } from './props';
1010
import VirtualizationAdapter from './VirtualizationAdapter';
1111

1212
import 'react-select/dist/react-select.css';
@@ -19,7 +19,7 @@ export default class Table extends Component<PropsWithDefaults> {
1919
}
2020

2121
public get setProps() {
22-
return this.__setProps();
22+
return this.__setProps(this.props.setProps);
2323
}
2424

2525
render() {
@@ -53,9 +53,7 @@ export default class Table extends Component<PropsWithDefaults> {
5353
() => new VirtualizationAdapter(this)
5454
);
5555

56-
private __setProps = memoizeOne(() => {
57-
const { setProps } = this.props;
58-
56+
private __setProps = memoizeOne((setProps?: SetProps) => {
5957
return setProps ? (newProps: any) => {
6058
if (R.has('dataframe', newProps)) {
6159
const { dataframe } = this.props;

0 commit comments

Comments
 (0)