Reputation: 1
if(props.filterCriteria.timeRange){
const start = props.filterCriteria.timeRange.start
const end = props.filterCriteria.timeRange.end
form.setFieldsValue({
created: [moment(start, 'YYYY-MM-DD HH:mm:ss'), moment(end, 'YYYY-MM-DD HH:mm:ss')]
})
}
Add this to the function component and report an error:
Warning: Cannot update during an existing state transition (such as within render
). Render methods should be a pure function of props and state.
Upvotes: 0
Views: 369