fix(instances): set correct values when sorting packages

This commit is contained in:
Sérgio Ramos 2018-03-02 14:11:02 +00:00
parent ec2f9fc141
commit 81c119a066

View File

@ -47,10 +47,10 @@ const PackageContainer = ({
packages, packages,
selected = {}, selected = {},
sortOrder, sortOrder,
sortBy,
handleRowClick, handleRowClick,
handleResetFilters, handleResetFilters,
handleSortBy, handleSortBy,
sortBy,
step step
}) => ( }) => (
<Fragment> <Fragment>
@ -250,10 +250,10 @@ export default compose(
handleSortBy: (newSortBy, sortOrder) => { handleSortBy: (newSortBy, sortOrder) => {
dispatch([ dispatch([
set({ set({
name: IC_PKG_V_SORT_BY, name: IC_PKG_V_SORT_ORDER,
value: sortOrder === 'desc' ? 'asc' : 'desc' value: sortOrder === 'desc' ? 'asc' : 'desc'
}), }),
set({ name: IC_PKG_V_SORT_ORDER, value: newSortBy }) set({ name: IC_PKG_V_SORT_BY, value: newSortBy })
]); ]);
} }
}) })