How to listen for when a variable changes?

Hello,

I also observed that my panel does not refresh when a variable changes.
I followed the link mentioned earlier: click and tried the following:

export const myCustomPanel = (props) => {
    const { data, options, timeRange, width, replaceVariables } = props;
    const query = replaceVariables('hello $Language');
  
    return <pre>{ JSON.stringify(query)}</pre>;
}

But then the variable changes, the panel is not updated unless I do a manual refresh - I always see the initial value.
Any ideas what I might be missing? I’m new to grafana, any help is appreciated :slight_smile:

1 Like