• What is KendoReact
  • Getting Started
  • Server Components
  • Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Add button in a Tab without triggering selection

Environment

Product Version5.14.1
ProductProgress® KendoReact

Description

I want to add a button in one of my Tabs in the TabStrip, but without triggering onSelect when the button is clicked.

Solution

The "title" property of the TabStripTab accepts string value and React Node and for placing a button within the TabStripTab you can set React Node with the tab title and the button. Within the onClick event of the Button, call preventDefault and stopPropagation for the event to stop the event from propagating to the TabStrip.

Following is an example demonstrating the approach:

Example
View Source
Change Theme:

In this article

Not finding the help you need?