Skip to content

Commit

Permalink
Show the search panel if there's a default search query (#3060)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer authored Apr 8, 2021
1 parent 07ecde4 commit d621b94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/state/actions/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ export function addWindow({ companionWindows, manifest, ...options }) {
defaultCompanionWindows.unshift(
{
content: options.sideBarPanel
|| (options.defaultSearchQuery && 'search')
|| config.window.defaultSideBarPanel
|| config.window.sideBarPanel,

default: true,
id: `cw-${uuid()}`,
position: 'left',
Expand All @@ -72,8 +74,8 @@ export function addWindow({ companionWindows, manifest, ...options }) {
rotation: null,
selectedAnnotations: {},
sideBarOpen: config.window.sideBarOpenByDefault !== undefined
? config.window.sideBarOpenByDefault
: config.window.sideBarOpen,
? config.window.sideBarOpenByDefault || !!options.defaultSearchQuery
: config.window.sideBarOpen || !!options.defaultSearchQuery,
sideBarPanel: options.sideBarPanel
|| config.window.defaultSideBarPanel
|| config.window.sideBarPanel,
Expand Down

0 comments on commit d621b94

Please sign in to comment.