mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-18 03:13:47 +00:00
Merge branch '166-fix-cannot-convert-undefined-or-null-to-object' into 'develop'
Resolve "Fix: Cannot convert undefined or null to object" Closes #166 See merge request bramw/baserow!98
This commit is contained in:
commit
719405ca28
2 changed files with 25 additions and 12 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
* Fixed error when there is no view.
|
||||
|
||||
## Released (2020-10-06)
|
||||
|
||||
* Prevent adding a new line to the long text field in the grid view when selecting the
|
||||
cell by pressing the enter key.
|
||||
* Fixed The table X is not found in the store error.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
)
|
||||
"
|
||||
>
|
||||
<span v-if="hasSelectedView()">
|
||||
<span v-if="hasSelectedView">
|
||||
<i
|
||||
class="header__filter-icon header-filter-icon--view fas"
|
||||
:class="'fa-' + view._.type.iconClass"
|
||||
|
@ -32,7 +32,10 @@
|
|||
</a>
|
||||
<ViewsContext ref="viewsContext" :table="table"></ViewsContext>
|
||||
</li>
|
||||
<li v-if="view._.type.canFilter" class="header__filter-item">
|
||||
<li
|
||||
v-if="hasSelectedView && view._.type.canFilter"
|
||||
class="header__filter-item"
|
||||
>
|
||||
<ViewFilter
|
||||
:view="view"
|
||||
:fields="fields"
|
||||
|
@ -40,7 +43,10 @@
|
|||
@changed="refresh()"
|
||||
></ViewFilter>
|
||||
</li>
|
||||
<li v-if="view._.type.canSort" class="header__filter-item">
|
||||
<li
|
||||
v-if="hasSelectedView && view._.type.canSort"
|
||||
class="header__filter-item"
|
||||
>
|
||||
<ViewSort
|
||||
:view="view"
|
||||
:fields="fields"
|
||||
|
@ -51,7 +57,7 @@
|
|||
</ul>
|
||||
<component
|
||||
:is="getViewHeaderComponent(view)"
|
||||
v-if="hasSelectedView()"
|
||||
v-if="hasSelectedView"
|
||||
:database="database"
|
||||
:table="table"
|
||||
:view="view"
|
||||
|
@ -66,7 +72,7 @@
|
|||
<div class="layout__col-3-2 content">
|
||||
<component
|
||||
:is="getViewComponent(view)"
|
||||
v-if="hasSelectedView() && !tableLoading"
|
||||
v-if="hasSelectedView && !tableLoading"
|
||||
ref="view"
|
||||
:database="database"
|
||||
:table="table"
|
||||
|
@ -169,6 +175,16 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
/**
|
||||
* Indicates if there is a selected view by checking if the view object has been
|
||||
* populated.
|
||||
*/
|
||||
hasSelectedView() {
|
||||
return (
|
||||
this.view !== undefined &&
|
||||
Object.prototype.hasOwnProperty.call(this.view, '_')
|
||||
)
|
||||
},
|
||||
...mapState({
|
||||
// We need the tableLoading state to show a small loading animation when
|
||||
// switching between views. Because some of the data will be populated by
|
||||
|
@ -222,13 +238,6 @@ export default {
|
|||
this.viewLoading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* Indicates if there is a selected view by checking if the view object has been
|
||||
* populated.
|
||||
*/
|
||||
hasSelectedView() {
|
||||
return Object.prototype.hasOwnProperty.call(this.view, '_')
|
||||
},
|
||||
},
|
||||
head() {
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue