The reason for my error report is:
I used sort to sort the values defined in data. Data detected changes and re rendered the template, resulting in repeated circular rendering, which gave me a warning (which also led to abnormal paging rendering)
{{ scope.row.jobs.sort((a, b)=> new Date(a.createdAt) – new Date(b.createdAt))[0].createdAt }}
Solution:
Sort works on itself, so I made a deep copy in sort.
{{ JSON.parse(JSON.stringify(scope.row.jobs)).sort((a, b)=> new Date(a.createdAt) – new Date(b.createdAt))[0].createdAt }}
Similar Posts:
- How to Solve Error: Unexpected token o in JSON at position 1
- Uncaught SyntaxError: Unexpected token o
- [How to Solve] Failed to convert value of type ‘java.lang.String’ to required type ‘java.util.Date’;
- Unexpected token ‘ in JSON at position 2 at JSON.parse
- When parsing background JSON data with Ajax: unexpected token o in JSON at position 1
- TypeError: Object of type ‘datetime‘ is not JSON serializable [Solved]
- [Solved] JpaRepository Error: Paging query needs to have a Pageable parameter! Offending method public abstract
- [Vue warn]: You may have an infinite update loop in a component render function.
- [Solved] scss File Use the Depth Selector /deep/ Error: Expected selector