Getting column metadata updates

Hi team,
Is there any possibility to get what was updated in particular when we change dataframe’s column metadata ?
I found this example: https://public.datagrok.ai/js/samples/data-frame/events/events , but when I’m changing column tag, for instance, “onMetadataChanged” returns null:

demog = grok.data.demo.demog();
view = grok.shell.addTableView(demog);

demog.onMetadataChanged.subscribe((data) => console.log(data)); // ‘data’ will be null

In general we are interested to react on column changes (such as coloring, etc.) to dynamically reflect this changes in custom viewers

Hello @makarkin.dv.1990
There’s no way to subscribe on tag changes in our API currently. Would it help if we pass these data as arguments to the ‘onMetadataChanged’ event? It will take some time since we will have to ensure this change doesn’t affect the performance in the most common cases.

Hi Diana,
Thank you for the reply. I think that should be what we need as soon as it seems “onMetadataChanged” event is fired on any column properties update, so we will be able to get what exactly was updated and on what column.

1 Like

@makarkin.dv.1990 We are working on this feature, it’s still in progress, let me share Andrew’s post on the topic (JavaScript API updates) and an example (https://dev.datagrok.ai/js/samples/data-frame/events/events). To make it work, run the script and change color-coding for a numeric column to ‘Conditional’ from the property panel. It should work with other tags, too, I’m testing it for DG.TAGS.FORMULA, so that you can listen to formula changes and re-calculate the values according to the new expression.