Skip to content

Commit c61817e

Browse files
committed
Closes #20 - fixed action button bug
1 parent 835e3d6 commit c61817e

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- autofocus bug ([#19](https://github.com/codewithkyle/notifyjs/issues/19))
13+
- action button bug ([#20](https://github.com/codewithkyle/notifyjs/issues/20))
1314

1415
## [2.1.1] - 2021-01-21
1516

src/snackbar-component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class SnackbarComponent extends HTMLElement {
1212
const target = e.currentTarget as HTMLElement;
1313
const index = parseInt(target.dataset.index);
1414
this.settings.buttons[index].callback();
15+
this.remove();
1516
};
1617

1718
private handleCloseClickEvent: EventListener = () => {

src/toast-component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export class ToastComponent extends HTMLElement {
1616
const target = e.currentTarget as HTMLElement;
1717
const index = parseInt(target.dataset.index);
1818
this.settings.buttons[index].callback();
19+
this.remove();
1920
};
2021

2122
private render() {

0 commit comments

Comments
 (0)