Skip to content

Commit

Permalink
fix(selection): stop emit unselect event if select field not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Antamansid committed Oct 17, 2024
1 parent e0524d9 commit 8642d3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/store/block/BlocksList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class BlockListStore {
if (!blockState) {
return;
}
if (selected !== blockState.selected) {
if (selected !== Boolean(blockState.selected)) {
if (!params?.ignoreChanges) {
blockState.updateBlock({ selected });
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/connection/ConnectionList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class ConnectionsStore {
) {
const state = connection instanceof ConnectionState ? connection : this.$connectionsMap.value.get(connection);
if (state) {
if (selected !== state.$state.value.selected) {
if (selected !== Boolean(state.$state.value.selected)) {
if (!params?.ignoreChange) {
state.updateConnection({
selected,
Expand Down

0 comments on commit 8642d3b

Please sign in to comment.