File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
packages/components/src/components/hds/disclosure-primitive
showcase/app/components/page-components/accordion/sub-sections Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,22 @@ export default class HdsDisclosurePrimitive extends Component<HdsDisclosurePrimi
5656 this . _isOpen = value || false ;
5757 }
5858
59- private _toggleControlled = modifier (
60- ( _element , [ isOpen ] : [ boolean | undefined ] ) => {
59+ private _toggleControlled = ( ( ) => {
60+ let isFirstRun = true ;
61+
62+ return modifier ( ( _element , [ isOpen ] : [ boolean | undefined ] ) => {
63+ if ( isFirstRun ) {
64+ isFirstRun = false ;
65+ return ;
66+ }
67+
6168 if ( isOpen !== undefined ) {
6269 this . isOpen = isOpen ;
6370 }
6471
6572 this . _isControlled = true ;
66- }
67- ) ;
73+ } ) ;
74+ } ) ( ) ;
6875
6976 @action
7077 onClickToggle ( ) : void {
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ const SubSectionBaseElements: TemplateOnlyComponent = <template>
161161
162162 <ShwTextH4 >States</ShwTextH4 >
163163
164+ {{! This one is broken }}
164165 {{#each TYPES as | type | }}
165166 {{#let ( array false true ) as | booleans | }}
166167 <ShwTextBody >{{capitalize type }} </ShwTextBody >
You can’t perform that action at this time.
0 commit comments