aiidalab / aiidalab/aiidalab-widgets-base

`_StructureDataBaseViewer` consider resetting `input_selection` trait when the structure is modified.

Open
#531 0 comments 0 reactions 1 assignee Claimed by @yakutovicha View on GitHub
Dominant language
Python
Stars
10
Forks
19
Avg merge
1d 22h
Merged PRs (30d)
20

Description

Currently, the issue with `input_selection` trait is that one cannot just assign to it a copy of the list with the same content:

```python
selection = copy(self.input_selection)
self.input_selection = selection
```
This won't trigger the trait observers (not sure why 🤷 ).

So the solution we currently use is the following:

```python
selection = copy(self.input_selection)
self.input_selection = None
self.input_selection = selection
```

This creates a lot of unnecessary code and increases the risk of errors. We should try to come up with a more general solution.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.