Skip to content

ui-core-react - ebay-tabs: "onSelect" is called on component render #407

@BhavinPatel04

Description

@BhavinPatel04

I verified there's no existing issue for this bug.

  • There are no existing issues

Current behavior

onSelect is called whenever the component is rendered. This affects the tracking behaviour as click event is fired even when the user has not clicked on the tab

Expected behavior

This method should be called only when the user clicks on a tab.

Package and version

@ebay/[email protected]

Device/OS/Browser info

Chrome

Steps to reproduce

1. Render the ebay-tabs component
2. Notice that onSelect function is called when the component renders

Relevant code block

https://github.com/eBay/evo-web/blob/main/packages/ebayui-core-react/src/ebay-tabs/tabs.tsx#L65

Additional context

No response

Metadata

Metadata

Assignees

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions