I have this code, which I took from the quick start docs, in my app:
monday.listen("context", res => {
console.log("something is happening");
this.setState({context: res.data});
console.log(res.data);
monday.api(`query ($boardIds: [Int]) { boards (ids:$boardIds) { name items() { name column_values { title text } } } }`,
{ variables: {boardIds: this.state.context.boardIds} }
)
.then(res => {
this.setState({boardData: res.data});
});
});
When the app view of the board is reloaded, it displays all the information on in the fields on the board:
"boards": [ { "name": "Test App", "items": [ { "name": "Facebook Pixel", "column_values": [ { "title": "Status",...
However, if I have two windows open, one with the main table and one with the app view; I update a field value in the main table, but the app view json does not reload, nor do I see anything in the console logs.
I’m trying to get a proof-of-concept, just to figure out how to trigger actions when a field value is changed.
A field, in the json above, is represented in the “items” list. An “item” is a row, and column_values give you the value of each column.