Merge pull request #393 from mirumee/fix/column-picker
Fix column picker errors
This commit is contained in:
commit
f9766a5c0c
3 changed files with 29 additions and 29 deletions
|
@ -30,6 +30,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Do not render password change if authenticating - #378 by @dominik-zeglen
|
- Do not render password change if authenticating - #378 by @dominik-zeglen
|
||||||
- Fix crash when one product is selected - #391 by @dominik-zeglen
|
- Fix crash when one product is selected - #391 by @dominik-zeglen
|
||||||
- Improve product update form error handling - #392 by @dominik-zeglen
|
- Improve product update form error handling - #392 by @dominik-zeglen
|
||||||
|
- Fix column picker errors - #393 by @dominik-zeglen
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,7 @@ const ColumnPicker: React.FC<ColumnPickerProps> = props => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<ClickAwayListener onClickAway={() => setExpansionState(false)}>
|
||||||
<div ref={anchor} className={className}>
|
<div ref={anchor} className={className}>
|
||||||
<ColumnPickerButton
|
<ColumnPickerButton
|
||||||
active={isExpanded}
|
active={isExpanded}
|
||||||
|
@ -97,10 +98,6 @@ const ColumnPicker: React.FC<ColumnPickerProps> = props => {
|
||||||
transformOrigin:
|
transformOrigin:
|
||||||
placement === "bottom" ? "right bottom" : "right top"
|
placement === "bottom" ? "right bottom" : "right top"
|
||||||
}}
|
}}
|
||||||
>
|
|
||||||
<ClickAwayListener
|
|
||||||
onClickAway={() => setExpansionState(false)}
|
|
||||||
mouseEvent="onClick"
|
|
||||||
>
|
>
|
||||||
<ColumnPickerContent
|
<ColumnPickerContent
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
@ -114,11 +111,11 @@ const ColumnPicker: React.FC<ColumnPickerProps> = props => {
|
||||||
onReset={handleReset}
|
onReset={handleReset}
|
||||||
onSave={handleSave}
|
onSave={handleSave}
|
||||||
/>
|
/>
|
||||||
</ClickAwayListener>
|
|
||||||
</Grow>
|
</Grow>
|
||||||
)}
|
)}
|
||||||
</Popper>
|
</Popper>
|
||||||
</div>
|
</div>
|
||||||
|
</ClickAwayListener>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@ const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
|
||||||
name={column.value}
|
name={column.value}
|
||||||
label={column.label}
|
label={column.label}
|
||||||
onChange={() => onColumnToggle(column.value)}
|
onChange={() => onColumnToggle(column.value)}
|
||||||
|
key={column.value}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
{loading && (
|
{loading && (
|
||||||
|
@ -160,6 +161,7 @@ const ColumnPickerContent: React.FC<ColumnPickerContentProps> = props => {
|
||||||
name={column.value}
|
name={column.value}
|
||||||
label={column.label}
|
label={column.label}
|
||||||
onChange={() => onColumnToggle(column.value)}
|
onChange={() => onColumnToggle(column.value)}
|
||||||
|
key={column.value}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue