Rerender paginated list on collection update

Rerender paginated list on collection update
This commit is contained in:
Omar 2021-07-29 10:53:22 +01:00
parent 6acf4addf4
commit 9572960ff6
2 changed files with 10 additions and 6 deletions

View File

@ -126,7 +126,8 @@ export default class HeroWebpartWebPart extends BaseClientSideWebPart<IHeroWebpa
hideLinkUploadTab: true
})
);
}
},
required: true
}
],
disabled: false

View File

@ -74,6 +74,9 @@ export default class HeroWebpart extends React.Component<IHeroWebpartProps, IHer
if(this.props.items !== prevProps.items || this.state.items !== prevState.items)
{
this.setState({items:this.props.items});
if(this.props.showAllHero){
this._getPage(this.state.currentPage);
}
}
}