fix(react): reverse result of topological sort, autofocus in add tag modal (#2759)

This commit is contained in:
Brian 2021-06-25 06:59:10 +08:00 committed by GitHub
parent 62ba937bb7
commit c2252427d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -50,9 +50,9 @@ describe('DataJobProfile', () => {
const jobsList = getAllByTestId('datajob-item-preview');
expect(jobsList.length).toBe(3);
expect(jobsList[0].innerHTML).toMatch(/DataJobInfoName3/);
expect(jobsList[0].innerHTML).toMatch(/DataJobInfoName2/);
expect(jobsList[1].innerHTML).toMatch(/DataJobInfoName/);
expect(jobsList[2].innerHTML).toMatch(/DataJobInfoName2/);
expect(jobsList[2].innerHTML).toMatch(/DataJobInfoName3/);
await act(() => promise);
});
});

View File

@ -113,6 +113,7 @@ export default function AddTagModal({ updateTags, globalTags, visible, onClose }
>
<TagSelect
allowClear
autoFocus
showSearch
placeholder="Find a tag"
defaultActiveFirstOption={false}

View File

@ -42,5 +42,5 @@ export function topologicalSort(input: Array<EntityRelationship | null>) {
}
});
return result;
return result.reverse();
}