Skip to content

Commit

Permalink
[desk-tool] Fix bug where pane options would be passed to view (#1653)
Browse files Browse the repository at this point in the history
* [desk-tool] Fix bug where pane options would be passed to view

* [test-studio] Pass through options for component pane and component view
  • Loading branch information
rexxars authored Dec 10, 2019
1 parent d1a40d7 commit c3c875e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/@sanity/desk-tool/src/pane/DocumentPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ export default withInitialValue(

// Other stuff
documentId: this.getPublishedId(),
options,
options: activeView.options,
schemaType,
markers: markers || []
}
Expand Down
14 changes: 2 additions & 12 deletions packages/test-studio/src/deskStructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const getDefaultDocumentNode = () => {
S.view.form().icon(EditIcon),
S.view
.component(DeveloperPreview)
.options({some: 'option'})
.icon(EyeIcon)
.title('Preview')
])
Expand Down Expand Up @@ -64,6 +65,7 @@ export default () =>
.child(
S.component(JsonDocumentDump)
.id('json-dump')
.options({pass: 'through'})
.menuItems([
S.menuItem()
.title('Reload')
Expand Down Expand Up @@ -136,18 +138,6 @@ export default () =>
.filter('_type == $type && role == $role')
.params({type: 'author', role: 'developer'})
.initialValueTemplates(S.initialValueTemplateItem('author-developer'))
.child(documentId =>
S.document()
.documentId(documentId)
.schemaType('author')
.views([
S.view.form().icon(EditIcon),
S.view
.component(DeveloperPreview)
.icon(EyeIcon)
.title('Preview')
])
)
}),

S.listItem({
Expand Down

0 comments on commit c3c875e

Please sign in to comment.