-
Notifications
You must be signed in to change notification settings - Fork 52
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
Sync itinerary sort with depart arrive #1266
Conversation
}, | ||
[onSortChange] | ||
) | ||
|
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 useCallback is probably hurting performance more than anything. onSortChange won't be recreated on renders anyway since it's being passed in
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.
Love!
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.
Big love, I'd just like to see this disabled by default
}, | ||
[onSortChange] | ||
) | ||
|
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.
Love!
Thank you! That map was a really good suggestion! |
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 love the typescript!
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.
Seems to work, see a few suggested code tweaks.
|
||
import { AppConfig } from '../../util/config-types' | ||
import { AppReduxState, FilterType, SortType } from '../../util/state-types' | ||
import { setQueryParam } from '../../actions/form' |
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.
Write import * as formActions from ...
and adjust in mapDispatchToProps
accordingly, so that the name of the function is not ambiguous inside the component (2 instances).
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.
What's the other instance?
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.
What's the other instance?
Actions imported from narrative.
…tp-react-redux into sync-sort-departarrive
hadn't realized you had approved, binh. merging now. |
Description:
This syncs the depart arrive setting from the date time selector with the sort option for the itineraries.
It also adds an associated configuration option.