Skip to content

Commit

Permalink
fix: data dimension spacing and crash (NO JIRA) (#504)
Browse files Browse the repository at this point in the history
* fix: proper spacing for data dimension selector

* fix: resolve crash issue due to ui@5 selected handling
  • Loading branch information
martinkrulltott authored Jun 18, 2020
1 parent da51e81 commit 99d6c73
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/DataDimension/DataTypesSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const DataTypes = ({ currentDataType, onChange }) => (
<SingleSelectField
label={i18n.t('Data Type')}
selected={dataTypes[currentDataType]?.id}
onChange={ref => onChange(ref.selected.value)}
onChange={ref => onChange(ref.selected)}
dense
>
{Object.values(dataTypes).map(type => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataDimension/Detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Detail = ({ currentValue, onChange }) => {
<SingleSelectField
label={i18n.t('Detail')}
selected={currentValue}
onChange={ref => onChange(ref.selected.value)}
onChange={ref => onChange(ref.selected)}
dense
>
{Object.entries(options).map(option => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/DataDimension/Groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Groups = ({
? dataTypes[dataType].getPlaceholder()
: null
}
onChange={ref => onGroupChange(ref.selected.value)}
onChange={ref => onGroupChange(ref.selected)}
dense
>
{optionItems.map(item => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ export default css`
.container {
display: flex;
flex-flow: column;
height: 70px;
border-bottom: 0;
padding-left: 10px;
padding-right: 5px;
padding-top: 5px;
padding: 5px 5px 10px 10px;
}
`
4 changes: 1 addition & 3 deletions src/components/DataDimension/styles/Detail.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ export default css`
.detail-container {
display: flex;
flex-flow: column;
width: 40%;
padding-right: 5px;
padding-left: 5px;
padding-left: 6px;
}
`
6 changes: 2 additions & 4 deletions src/components/DataDimension/styles/Groups.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ export default css`
min-height: 53px;
border-right: 0;
border-left: 0;
padding-top: 5px;
padding-left: 10px;
padding: 5px 5px 10px 10px;
}
.group-container {
display: flex;
flex-direction: column;
width: inherit;
min-width: 294px;
min-width: 290px;
flex-grow: 1;
padding-right: 5px;
}
`

0 comments on commit 99d6c73

Please sign in to comment.