You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, i used grid in reactjs with typescript, when i change dataModel, the grid is not refresh;
and how to solved? my code is following:
"pqgrid": "^6.2.4",
"typescript": "^3.1.6",
"react": "^16.9.0",
grid.tsx:
export default class Pqgrid extends React.Component<any, {}>{
hello, i used grid in reactjs with typescript, when i change dataModel, the grid is not refresh;
and how to solved? my code is following:
"pqgrid": "^6.2.4",
"typescript": "^3.1.6",
"react": "^16.9.0",
grid.tsx:
export default class Pqgrid extends React.Component<any, {}>{
componentDidMount() {
//@ts-ignore
this.options = this.props.options;
//@ts-ignore
this.grid = pq.grid(this.refs.grid, this.options);
//@ts-ignore
console.log('render grid', this.grid)
}
componentDidUpdate(prevProps) {
//@ts-ignore
console.log('this.options:', this.options)
//@ts-ignore
Object.assign(this.options, this.props.options);
//@ts-ignore
this.grid.option("colModel", this.options.colModel)
//@ts-ignore
this.grid.option("dataModel", this.options.dataModel)
//@ts-ignore
this.grid.refreshDataAndView();
}
render() {
return
}
}
The text was updated successfully, but these errors were encountered: