Partial touch on a widget view?

I found a better solution. No change is required in Python (no need to override _repr_mimebundle), and as usual traits must be defined with .tag(sync=True) to ensure sync from backend to browser.

In Javascript, to send specific changes to the backend, I use:
this.model.sync('patch', this.model, {'attrs': {key:value}});
(the ‘attrs’ dict can have multiple key:value pairs)

For this solution to work, there should be no use of .touch() or model.save() in Javascript.

The sync method is defined here:

1 Like