Skip to content

Commit

Permalink
Fix AT toast input
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kudinov committed Sep 5, 2024
1 parent 541696c commit 9398050
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/app/modules/toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Toast: FC = () => {
<>
<GlobalStyle />
<ToastContainer />
<Input value={store.lastText} id="toast-text" />
{!!store.lastText && <Input value={store.lastText} id="toast-text" />}
</>
)
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/app/modules/toast/toast.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export class ToastStore {
this.lastText = ''
}

private onClose() {
this.lastText = ''
}

setTheme(isDarkTheme: boolean) {
this.isDarkTheme = isDarkTheme
}
Expand All @@ -26,6 +30,7 @@ export class ToastStore {
theme: this.isDarkTheme ? 'dark' : 'light',
position: 'bottom-left' as ToastPosition,
autoClose: timeout,
onClose: this.onClose.bind(this),
}

toast.info(text, toastOptions)
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-feature-smartapp",
"version": "2.4.2",
"version": "2.4.3",
"description": "SmartApp with all features",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9398050

Please sign in to comment.