Skip to content

Commit

Permalink
Merge pull request FlowiseAI#1799 from vinodkiran/BUGFIX/dashboard-vi…
Browse files Browse the repository at this point in the history
…ew-toggle

Bugfix: View Toggle loses state when button is clicked twice.
  • Loading branch information
vinodkiran authored Feb 23, 2024
2 parents ada19b6 + f690943 commit 39f6991
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ui/src/views/chatflows/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Chatflows = () => {
const [view, setView] = React.useState(localStorage.getItem('flowDisplayStyle') || 'card')

const handleChange = (event, nextView) => {
if (nextView === null) return
localStorage.setItem('flowDisplayStyle', nextView)
setView(nextView)
}
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/views/marketplaces/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const Marketplace = () => {
}

const handleViewChange = (event, nextView) => {
if (nextView === null) return
localStorage.setItem('mpDisplayStyle', nextView)
setView(nextView)
}
Expand Down

0 comments on commit 39f6991

Please sign in to comment.