Closed snice closed 6 years ago
export default class DatasourceViewModel { @observable public activePid: string = 'loading'; }
export default class Datasource extends Vue { @inject() public store: DatasourceViewModel; activePid: string = 'loading'; $refs: { tableStruct: TableStruct, tableData: TableData, }; //@Watch('store.activePid') @Watch('activePid') onActivePidChanged(val: string, oldVal: string) { this.$refs.tableStruct.packageId = val; } }
use the observe api in mobx https://mobx.js.org/refguide/observe.html#observe
Thanks for your feedback!