Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable selected items when MultiComboBox is disabled #1544

Merged
merged 2 commits into from May 24, 2021

Conversation

yt-ymmt
Copy link
Contributor

@yt-ymmt yt-ymmt commented Apr 26, 2021

Related URL

https://smarthr.atlassian.net/browse/SHRUI-390

Overview

  • Disable selected items when MultiComboBox is disabled.

What I did

  • The disabled flag switches the button between enabled and disabled.

Capture

image

@yt-ymmt yt-ymmt self-assigned this Apr 26, 2021
@yt-ymmt yt-ymmt requested a review from a team as a code owner April 26, 2021 03:56
@yt-ymmt yt-ymmt requested review from moshisora and im36-123 and removed request for a team April 26, 2021 03:56
@yt-ymmt yt-ymmt changed the title [WIP] fix: if MultiComboBox is disabled, the selected items should be disabled [WIP] fix: Disable selected items when MultiComboBox is disabled Apr 26, 2021
@netlify
Copy link

netlify bot commented Apr 26, 2021

Deploy Preview for smarthr-ui ready!

Built with commit 8e98aec

https://deploy-preview-1544--smarthr-ui.netlify.app

@yt-ymmt yt-ymmt changed the title [WIP] fix: Disable selected items when MultiComboBox is disabled fix: Disable selected items when MultiComboBox is disabled May 16, 2021
onClick={() => onDelete({ value, label })}
>
<FaTimesCircleIcon
size={11}
color={theme.palette.TEXT_BLACK}
color={disabled ? theme.color.TEXT_DISABLED : theme.color.TEXT_BLACK}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ボタン側で color 指定あると思うので、color: inherit の方がよさそう。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uknmr
ありがとうございます〜修正しました 🙏
34acc67

onClick={() => onDelete({ value, label })}
>
<FaTimesCircleIcon
size={11}
color={theme.palette.TEXT_BLACK}
color={disabled ? 'inherit' : theme.color.TEXT_BLACK}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

説明不足ですいません。
disabled ではないときもボタンカラーがあるのでどちらも inherit でいけます。分岐が不要です。

Suggested change
color={disabled ? 'inherit' : theme.color.TEXT_BLACK}
color="inherit"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uknmr :aa: 気づかなくてごめんなさい
修正 push しました 🙏

Copy link
Collaborator

@uknmr uknmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:+1:

Copy link
Contributor

@im36-123 im36-123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@yt-ymmt yt-ymmt merged commit 8edb9e0 into kufu:master May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants