Vue Lookup - Access the DataSource

Regardless of the data source you use, the Lookup always wraps it in a DataSource. Call the getDataSource() method to get the instance of the DataSource.

  • <template>
  • <DxLookup ...
  • ref="lookup"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxLookup } from 'devextreme-vue/lookup';
  •  
  • export default {
  • components: {
  • DxLookup
  • },
  • methods: {
  • getDataSource() {
  • this.ds = this.$refs.lookup.instance.getDataSource();
  • }
  • }
  • }
  • </script>

Now, you can call any method the DataSource exposes. For example, you can reload data using the reload() method.

JavaScript
  • lookupDataSource.reload();
See Also