File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -285,9 +285,9 @@ export default class IgcTooltipComponent extends EventEmitterMixin<
285285
286286 await this . _setDelay ( this . hideDelay ) ;
287287
288- this . open = false ;
289288 this . toBeHidden = true ;
290289 const result = await this . _toggleAnimation ( 'close' ) ;
290+ this . open = false ;
291291 this . toBeHidden = false ;
292292
293293 return result ;
Original file line number Diff line number Diff line change @@ -294,18 +294,22 @@ export const Toggle: Story = {
294294 // Use a template ref id to target the tooltip instance
295295 const tooltipId = 'toggle-tooltip' ;
296296 const buttonId = 'toggle-button' ;
297+ const buttonIdToggler = 'toggler-button' ;
297298
298299 // Hook into the rendered DOM to attach click listener
299300 setTimeout ( ( ) => {
300301 const tooltip = document . getElementById ( tooltipId ) as IgcTooltipComponent ;
301- const button = document . getElementById ( buttonId ) as HTMLButtonElement ;
302+ const button = document . getElementById (
303+ buttonIdToggler
304+ ) as HTMLButtonElement ;
302305
303306 if ( tooltip && button ) {
304307 button . addEventListener ( 'click' , ( ) => tooltip . toggle ( ) ) ;
305308 }
306309 } ) ;
307310
308311 return html `
312+ < igc-button id =${ buttonIdToggler } > Toggle</ igc-button >
309313 < igc-button id =${ buttonId } > Toggle Tooltip</ igc-button >
310314 < igc-tooltip
311315 id =${ tooltipId }
You can’t perform that action at this time.
0 commit comments