Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a search function #78

Merged
merged 4 commits into from
Mar 21, 2023
Merged

Conversation

wj23027
Copy link
Contributor

@wj23027 wj23027 commented Mar 20, 2023

Brief Information

Related issues:

Details

  • add a search function, so that users can search by name to find relevant data about the companies, projects, or developers they intersted in.

image

@wj23027
Copy link
Contributor Author

wj23027 commented Mar 20, 2023

This layout is a bit messy, welcome suggestions to continue to adjust.

Comment on lines 435 to 447
//搜索特定数据
let queryData;
if (search) {
queryData = dataSource.filter((dataSource) => {
return dataSource.name.toLowerCase() == search.trim().toLowerCase();
});
if (queryData.length == 0) {
message.warning(t('no_result'));
} else {
dataSource = queryData;
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it provide a fuzzy search matching function? Users may only want to enter some keywords of the org/repo name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed to fuzzy search and improved the layout~

@wj23027
Copy link
Contributor Author

wj23027 commented Mar 21, 2023

the screenshot:

image

Copy link
Member

@zhicheng-ning zhicheng-ning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!Thanks for your contribution!

@zhicheng-ning zhicheng-ning merged commit 37c5f8a into X-lab2017:main Mar 21, 2023
@wj23027 wj23027 deleted the feat/search branch June 6, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] add a search function for querying repo or developer
2 participants