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

gt - Update HMF Tooltip #409

Merged
merged 2 commits into from
May 24, 2018
Merged

gt - Update HMF Tooltip #409

merged 2 commits into from
May 24, 2018

Conversation

gthomas-appfolio
Copy link
Contributor

Works around disabledReason Tooltip not showing up on disabled delete button, by showing a Button with disabled className and no onClick if disabled.

"Why not just do a no-op on ConfirmationButton onClick?"
Because the ConfirmationButton has it's own onClick to show "Delete" confirmation message and can only be disabled with the disabled attribute (which then breaks Tooltips..)

Works around disabledReason Tooltip not showing up on disabled delete button, by showing a Button with `disabled` className and no onClick if disabled
id={this.id}
color="danger"
outline
className="p-2 disabled"
Copy link
Contributor

Choose a reason for hiding this comment

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

onClick={e => e.preventDefault()} ?

- Prevent default for disabled onClick
- Update story
@@ -26,6 +26,7 @@ storiesOf('HasManyFields', module)
onDelete={action('onDelete')}
disabled={boolean('disabled', false)}
disabledReason={text('disabledReason')}
disabledReasonPlacement={select('placement', ['top', 'left', 'bottom', 'right'], 'top')}
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for adding this 👍

@sveinn sveinn merged commit 1eca7a4 into master May 24, 2018
@sveinn sveinn deleted the correctHMFTooltip branch May 24, 2018 14:48
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.

2 participants