-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
This layout is a bit messy, welcome suggestions to continue to adjust. |
src/components/table.js
Outdated
//搜索特定数据 | ||
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; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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~
There was a problem hiding this 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!
Brief Information
Related issues:
Details