我正在使用来自stackoverflow的this答案的阶梯状滑块。
因此,滑块的值由“点”设置
import * as React from "react";
import ReactTable from "react-table";
import "react-table/react-table.css";
interface IProps {
data: any;
columns: any;
rowClicked(): void;
}
interface IState {}
export default class DataGrid extends React.Component<IProps, IState> {
onRowClick = (state: any, rowInfo: any, column: any, instance: any) => {
this.props.rowClicked();
};
render() {
return (
<>
<ReactTable
data={this.props.data}
columns={this.props.columns}
getTdProps={this.onRowClick}
/>
</>
);
}
}
并通过函数转换输出值
this.state = {
sliderValue: 50
}
问题是如何计算从sliderTransform(this.state.sliderValue)
到output
的值(创建还原points
函数)?
sliderTransform