-
Notifications
You must be signed in to change notification settings - Fork 251
Users table refactor #7598
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
Users table refactor #7598
Conversation
Pull Request Test Coverage Report for Build 16477006285Details
💛 - Coveralls |
david-yz-liu
left a comment
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.
@chickenwaddle77 nice work! I just left a few minor comments
| import {faPencil, faTrashCan} from "@fortawesome/free-solid-svg-icons"; | ||
| import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; | ||
|
|
||
| import Table from "./table/table"; |
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.
This is good, but there are now unused imports that you can remove.
| }); | ||
| .then(json => json.data); | ||
| } | ||
| processData(data) { |
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.
Add a blank line before this method
| loading={this.state.loading} | ||
| noDataText={I18n.t("tas.empty_table")} | ||
| /> | ||
| <Table data={this.state.data} columns={this.columns} noDataText={I18n.t("tas.empty_table")} /> |
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.
Note that the data variable is defined immediately above this, so you can either delete that variable or just pass in data here.
| filterOptions: [ | ||
| { | ||
| value: "active", | ||
| text: `${I18n.t("roles.active")} (${this.state.counts.active})`, |
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.
@chickenwaddle77 one other thing I forgot to mention: because this part is being deleted, you can also get rid of the counts state attribute, which is no longer used.
merging with master branch
Proposed Changes
Refactored the current react table v6 to react table v8. Functionality and he remains the same as before.
Details
Screenshots of your changes (if applicable)
Associated documentation repository pull request (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)