-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor the function for filtering the currency list #13412
Conversation
@aimane-chnaif @techievivek One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
this.state = { | ||
searchValue: '', | ||
currencyData: currencyOptions, | ||
currencyData: this.getFilteredCurrencyList(), |
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.
currencyData: this.getFilteredCurrencyList(), | |
currencyData: this.getCurrencyOptions(this.props.currencyList), |
This is similar to was I was fighting the contributor on: let's not call a function with a parameter with a specific value such that the function does nothing
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.
Oh yes, got it. There is then no need for a function for the filtering, since it is only called once.
@@ -84,19 +82,24 @@ class IOUCurrencySelection extends Component { | |||
})); | |||
} | |||
|
|||
getFilteredCurrencyList(searchValue = '') { |
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.
getFilteredCurrencyList(searchValue = '') { | |
getFilteredCurrencyList(searchValue) { |
Reviewer Checklist
Screenshots/Videos |
|
(cherry picked from commit c9de2b4)
…-13412 🍒 Cherry pick PR #13412 to staging 🍒
🚀 Cherry-picked to staging by @francoisl in version: 1.2.36-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by @francoisl in version: 1.2.36-4 🚀
|
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
Fixed Issues
$ #13286
Tests
Test three different components from the floating-action-button:
Test one component from a group (multiple participants) chat window:
For every component, run these tests:
Offline tests
Same as the above. There is no difference in the flow for the selector.
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android