Fix loss of tree node state when switching views
This commit fixes an issue where the check state of categories was lost when toggling between card and tree views. This is solved by immediately emitting node state changes for all nodes. This ensures consistent view transitions without any loss of node state information. Furthermore, this commit includes added unit tests for the modified code sections.
This commit is contained in:
@@ -12,7 +12,7 @@ export class TreeNodeStateDescriptorStub implements TreeNodeStateDescriptor {
|
||||
|
||||
public isFocused = false;
|
||||
|
||||
public withFocusState(isFocused: boolean): this {
|
||||
public withFocus(isFocused: boolean): this {
|
||||
this.isFocused = isFocused;
|
||||
return this;
|
||||
}
|
||||
@@ -21,4 +21,9 @@ export class TreeNodeStateDescriptorStub implements TreeNodeStateDescriptor {
|
||||
this.checkState = checkState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withVisibility(isVisible: boolean): this {
|
||||
this.isVisible = isVisible;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user