vuetifyjs / vuetify
1
// Styles
2 1
import './VDataTableHeader.sass'
3

4
// Components
5 1
import VDataTableHeaderMobile from './VDataTableHeaderMobile'
6 1
import VDataTableHeaderDesktop from './VDataTableHeaderDesktop'
7

8
// Mixins
9 1
import header from './mixins/header'
10

11
// Utilities
12 1
import dedupeModelListeners from '../../util/dedupeModelListeners'
13 1
import mergeData from '../../util/mergeData'
14 1
import rebuildSlots from '../../util/rebuildFunctionalSlots'
15

16
// Types
17 1
import Vue from 'vue'
18

19
/* @vue/component */
20 1
export default Vue.extend({
21
  name: 'v-data-table-header',
22

23
  functional: true,
24

25
  props: {
26
    ...header.options.props,
27
    mobile: Boolean,
28
  },
29

30 1
  render (h, { props, data, slots }) {
31 1
    dedupeModelListeners(data)
32 1
    const children = rebuildSlots(slots(), h)
33

34 1
    data = mergeData(data, { props })
35

36 1
    if (props.mobile) {
37 1
      return h(VDataTableHeaderMobile, data, children)
38
    } else {
39 1
      return h(VDataTableHeaderDesktop, data, children)
40
    }
41
  },
42
})

Read our documentation on viewing source code .

Loading