checkRefresh(refreshData, changed, flags) {
    const changePath = _.get(changed, 'instance.path', false);
    // Don't let components change themselves.
    if (changePath && this.path === changePath) {
      return;
    }
    if (refreshData === 'data') {
      this.refresh(this.data, changed, flags);
    }
    else if (
      (changePath && (changed.instance?.paths?.localPath === refreshData)) && changed && changed.instance &&
      // Make sure the changed component is not in a different "context". Solves issues where refreshOn being set
      // in fields inside EditGrids could alter their state from other rows (which is bad).
      this.inContext(changed.instance)
    ) {
      this.refresh(changed.value, changed, flags);
    }
  }
Determines if the component should be refreshed based on the path of another component that changed.
@param {string} refreshData - The path of the data that needs to trigger a refresh.
@param {boolean} changed - Flag that is true if the data has been changed.
@param {any} flags - The flags for the checkData procedure.
@returns {void}