Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
ecaab513
Commit
ecaab513
authored
Apr 6, 2020
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
support update of props.initiallyCollapsed in CollapsableControls
parent
2a4d4571
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-plugin-ui/base.tsx
+7
-1
7 additions, 1 deletion
src/mol-plugin-ui/base.tsx
with
7 additions
and
1 deletion
src/mol-plugin-ui/base.tsx
+
7
−
1
View file @
ecaab513
/**
/**
* Copyright (c) 2018-20
19
mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2018-20
20
mol* contributors, licensed under MIT, See LICENSE file for more info.
*
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
...
@@ -83,6 +83,12 @@ export abstract class CollapsableControls<P = {}, S = {}, SS = {}> extends Plugi
...
@@ -83,6 +83,12 @@ export abstract class CollapsableControls<P = {}, S = {}, SS = {}> extends Plugi
this
.
setState
({
isCollapsed
:
!
this
.
state
.
isCollapsed
}
as
(
S
&
CollapsableState
))
this
.
setState
({
isCollapsed
:
!
this
.
state
.
isCollapsed
}
as
(
S
&
CollapsableState
))
}
}
componentDidUpdate
(
prevProps
:
P
&
CollapsableProps
)
{
if
(
this
.
props
.
initiallyCollapsed
!==
undefined
&&
prevProps
.
initiallyCollapsed
!==
this
.
props
.
initiallyCollapsed
)
{
this
.
setState
({
isCollapsed
:
this
.
props
.
initiallyCollapsed
as
any
});
}
}
protected
abstract
defaultState
():
(
S
&
CollapsableState
)
protected
abstract
defaultState
():
(
S
&
CollapsableState
)
protected
abstract
renderControls
():
JSX
.
Element
|
null
protected
abstract
renderControls
():
JSX
.
Element
|
null
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment