Commit db1df18d authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '160-catalog-editors-crop-selector' into 'master'

Resolve "Catalog editors: Crop selector"

Closes #160

See merge request genesys-pgr/genesys-ui!163
parents d60e1174 085a8e80
......@@ -27,7 +27,7 @@ export const loadCrops = (forceReload: boolean = false) => (dispatch, getState)
if (isDataStale || forceReload) {
return CropService.listCrops()
.then((list) => {
dispatch(receiveCrops(list));
dispatch(receiveCrops(list.sort((a, b) => a.name.localeCompare(b.name))));
})
.catch((error) => {
log('Error', error);
......
......@@ -55,7 +55,7 @@ class BasicInfoStep extends StepperTemplate<IDescriptorListProps> {
const mapStateToProps = (state, ownProps) => ({
myPartners: state.partner.dashboard.myPartners,
crops: state.crop.list,
crops: state.crop.public.list,
isInvalidForm: isInvalid(DESCRIPTORLIST_FORM)(state),
});
......
......@@ -259,7 +259,7 @@ class DescriptorForm extends React.Component<any, any> {
const selector = formValueSelector(DESCRIPTOR_FORM);
const mapStateToProps = (state, ownProps) => ({
crops: state.crop.list,
crops: state.crop.public.list,
dataType: selector(state, 'dataType'),
currentTerms: selector(state, 'terms'),
currentOwner: selector(state, 'owner'),
......
......@@ -12,7 +12,7 @@ import Checkbox from '@material-ui/core/Checkbox';
const styles = (theme) =>({
radioGroupMultiColumn: {
flexDirection: 'row' as 'row',
justifyContent: 'space-between' as 'space-between',
justifyContent: 'flex-start' as 'flex-start',
'& > label': {
flexBasis: '12%',
[theme.breakpoints.down('lg')]: {
......
......@@ -12,7 +12,7 @@ import { withStyles } from '@material-ui/core/styles';
const styles = (theme) =>({
radioGroupMultiColumn: {
flexDirection: 'row' as 'row',
justifyContent: 'space-evenly' as 'space-evenly',
justifyContent: 'flex-start' as 'flex-start',
'& > label': {
flexBasis: '12%',
[theme.breakpoints.down('md')]: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment