SbloodyS commented on code in PR #17989:
URL:
https://github.com/apache/dolphinscheduler/pull/17989#discussion_r2851458596
##########
dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts:
##########
@@ -506,17 +506,26 @@ export function useTable() {
const getTableData = (params: IDefinitionParam) => {
if (variables.loadingRef) return
variables.loadingRef = true
- const { state } = useAsyncState(
- queryListPaging({ ...params }, variables.projectCode).then((res: any) =>
{
+ // Always release loading lock, even when request fails.
+ const queryStatePromise = queryListPaging(
+ { ...params },
+ variables.projectCode
+ )
+ .then((res: any) => {
variables.totalCount = res.total
variables.totalPage = res.totalPage
variables.tableData = res.totalList.map((item: any) => {
return { ...item }
})
+ })
+ .catch((err: Error) => {
+ window.$message.error(err?.message || 'Request failed')
Review Comment:
It's better to use i18n to show message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]