From de40b4b2b68140f70880744b54e7db4c5bd19e50 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Thu, 4 Apr 2019 10:44:22 +0200 Subject: [PATCH] Specify prop type --- src/scripts/js/es6/common/vuecomponents/table/Table.js | 2 +- .../vuecomponents/table/cells/renderer/CellDefault.js | 7 +++++-- .../common/vuecomponents/table/cells/renderer/CellProxy.js | 7 +++++-- .../common/vuecomponents/table/cells/renderer/HeadCell.js | 4 +++- .../vuecomponents/table/columns/filter/ColumnFilter.js | 2 +- .../common/vuecomponents/table/rows/filter/EnumFilter.js | 2 +- .../js/es6/common/vuecomponents/table/rows/renderer/Row.js | 3 ++- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/scripts/js/es6/common/vuecomponents/table/Table.js b/src/scripts/js/es6/common/vuecomponents/table/Table.js index 4c07fc95..7f318c80 100644 --- a/src/scripts/js/es6/common/vuecomponents/table/Table.js +++ b/src/scripts/js/es6/common/vuecomponents/table/Table.js @@ -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 } diff --git a/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellDefault.js b/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellDefault.js index 08796aed..f02a6c84 100644 --- a/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellDefault.js +++ b/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellDefault.js @@ -1,3 +1,6 @@ +import {ColumnBase} from '../../columns/ColumnBase' +import {RowBase} from '../../rows/RowObjectBase' + const TEMPLATE =`
{{ 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: { diff --git a/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellProxy.js b/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellProxy.js index ac3322de..26bf97a9 100644 --- a/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellProxy.js +++ b/src/scripts/js/es6/common/vuecomponents/table/cells/renderer/CellProxy.js @@ -1,3 +1,6 @@ +import {RowBase} from '../../rows/RowObjectBase' +import {ColumnBase} from '../../columns/ColumnBase' + const TEMPLATE =`