Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

refactor: remove tabindex @Prop #267

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/components/calcite-tip-manager/calcite-tip-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export class CalciteTipManager {
*/
@Prop({ reflect: true }) theme: CalciteTheme;

@Prop({ reflect: true }) tabindex = 0;

// --------------------------------------------------------------------------
//
// Private Properties
Expand Down Expand Up @@ -243,16 +241,18 @@ export class CalciteTipManager {
}
return (
<Host onKeydown={this.tipManagerKeyDownHandler}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: you could move the onKeyDown to the element that receives focus but it will bubble up in this case.

<header class={CSS.header}>
<h2 class={CSS.heading}>{this.groupTitle}</h2>
<calcite-action text={this.textClose} onClick={this.hideTipManager} class={CSS.close}>
<CalciteIcon size="16" path={x16} />
</calcite-action>
</header>
<div class={classnames(CSS.tipContainer, this.direction)} key={this.selectedIndex}>
<slot />
<div tabindex="0">
<header class={CSS.header}>
<h2 class={CSS.heading}>{this.groupTitle}</h2>
<calcite-action text={this.textClose} onClick={this.hideTipManager} class={CSS.close}>
<CalciteIcon size="16" path={x16} />
</calcite-action>
</header>
<div class={classnames(CSS.tipContainer, this.direction)} key={this.selectedIndex}>
<slot />
</div>
{this.renderPagination()}
</div>
{this.renderPagination()}
</Host>
);
}
Expand Down