Specify prop type
This commit is contained in:
@@ -91,7 +91,7 @@ let PillarTable = Vue.component('pillar-table-base', {
|
||||
default: true
|
||||
},
|
||||
componentState: {
|
||||
// Instance of ComponentState
|
||||
// Instance of ComponentState (but type Object since it has been deserialized)
|
||||
type: Object,
|
||||
default: undefined
|
||||
}
|
||||
|
@@ -1,3 +1,6 @@
|
||||
import {ColumnBase} from '../../columns/ColumnBase'
|
||||
import {RowBase} from '../../rows/RowObjectBase'
|
||||
|
||||
const TEMPLATE =`
|
||||
<div>
|
||||
{{ cellValue }}
|
||||
@@ -11,8 +14,8 @@ const TEMPLATE =`
|
||||
let CellDefault = Vue.component('pillar-cell-default', {
|
||||
template: TEMPLATE,
|
||||
props: {
|
||||
column: Object,
|
||||
rowObject: Object,
|
||||
column: ColumnBase,
|
||||
rowObject: RowBase,
|
||||
rawCellValue: [String,Number,Boolean,Array,Object,Date,Function,Symbol,],
|
||||
},
|
||||
computed: {
|
||||
|
@@ -1,3 +1,6 @@
|
||||
import {RowBase} from '../../rows/RowObjectBase'
|
||||
import {ColumnBase} from '../../columns/ColumnBase'
|
||||
|
||||
const TEMPLATE =`
|
||||
<component class="pillar-cell"
|
||||
:class="cellClasses"
|
||||
@@ -18,8 +21,8 @@ const TEMPLATE =`
|
||||
let CellProxy = Vue.component('pillar-cell-proxy', {
|
||||
template: TEMPLATE,
|
||||
props: {
|
||||
column: Object, // ColumnBase
|
||||
rowObject: Object // RowObject
|
||||
column: ColumnBase,
|
||||
rowObject: RowBase,
|
||||
},
|
||||
computed: {
|
||||
/**
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import {ColumnBase} from '../../columns/ColumnBase'
|
||||
|
||||
const TEMPLATE =`
|
||||
<div class="pillar-cell header-cell"
|
||||
:class="cellClasses"
|
||||
@@ -34,7 +36,7 @@ const TEMPLATE =`
|
||||
Vue.component('pillar-head-cell', {
|
||||
template: TEMPLATE,
|
||||
props: {
|
||||
column: Object
|
||||
column: ColumnBase,
|
||||
},
|
||||
computed: {
|
||||
cellClasses() {
|
||||
|
@@ -63,7 +63,7 @@ let Filter = Vue.component('pillar-table-column-filter', {
|
||||
template: TEMPLATE,
|
||||
props: {
|
||||
columns: Array, // Instances of ColumnBase
|
||||
componentState: Object, // Instance of ComponentState
|
||||
componentState: Object, // Instance of ComponentState (but type Object since it has been deserialized)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@@ -63,7 +63,7 @@ let EnumFilter = {
|
||||
props: {
|
||||
label: String,
|
||||
availableValues: Array, // Array with valid values [{value: abc, displayName: xyz},...]
|
||||
componentState: Object, // Instance of ComponentState.
|
||||
componentState: Object, // Instance of ComponentState (but type Object since it has been deserialized)
|
||||
valueExtractorCB: {
|
||||
// Callback to extract enumvalue from a rowObject
|
||||
type: Function,
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import '../../cells/renderer/CellProxy'
|
||||
import {RowBase} from '../RowObjectBase'
|
||||
|
||||
|
||||
const TEMPLATE =`
|
||||
@@ -21,7 +22,7 @@ const TEMPLATE =`
|
||||
Vue.component('pillar-table-row', {
|
||||
template: TEMPLATE,
|
||||
props: {
|
||||
rowObject: Object,
|
||||
rowObject: RowBase,
|
||||
columns: Array
|
||||
},
|
||||
computed: {
|
||||
|
Reference in New Issue
Block a user