I have implemented the sorting functionality ,I have used constructor to initialize the state and componentDidUpdate to update the state with new items.
constructor(props) {this.state = { items: props.items }}public componentDidUpdate(oldProps: FallbackFormContainerProps) {if (oldProps.items!== this.props.items) { this.setState({ items: this.props.items });}}OnColumnSorting() { //sorting and set state this.setState({ columns: newColumns, items: newItems });}
On check box changed event
private OnChange= (formId: string, checked?: boolean): void => {//change event
};
But the problem is that after sorting if i am changing the check box change event then I am getting new props which have different order than my state , so detail list is refreshing with new order,How i can revoke that only change event will fire not whole detail list will refresh