Web: Components: fixed SelectedItem and SelectorAddButton click when components is disabled
This commit is contained in:
parent
2c818b0e71
commit
60b172e8d8
@ -44,6 +44,10 @@ const SelectedItem = (props) => {
|
||||
const { isDisabled, text, onClose } = props;
|
||||
const colorProps = { color: isDisabled ? "#D0D5DA" : "#555F65" };
|
||||
|
||||
const onCloseClick = (e) => {
|
||||
!isDisabled && onClose && onClose(e);
|
||||
};
|
||||
|
||||
//console.log("SelectedItem render");
|
||||
return (
|
||||
<StyledSelectedItem {...props}>
|
||||
@ -52,7 +56,7 @@ const SelectedItem = (props) => {
|
||||
{text}
|
||||
</Text>
|
||||
</StyledSelectedTextBox>
|
||||
<StyledCloseButton onClick={onClose} isDisabled={isDisabled}>
|
||||
<StyledCloseButton onClick={onCloseClick} isDisabled={isDisabled}>
|
||||
<IconButton
|
||||
color="#979797"
|
||||
size={10}
|
||||
|
@ -26,7 +26,11 @@ const StyledButton = styled.div`
|
||||
`;
|
||||
|
||||
const SelectorAddButton = (props) => {
|
||||
const { isDisabled, title, onClick, className, id, style } = props;
|
||||
const { isDisabled, title, className, id, style } = props;
|
||||
|
||||
const onClick = (e) => {
|
||||
!isDisabled && props.onClick && props.onClick(e);
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledButton
|
||||
|
Loading…
Reference in New Issue
Block a user