score:2
Accepted answer
if i understand your question correctly, you can use the selectactive tab to hide / display the tab of your choice like this:
<row classname="mt-3">
<col>
<tabs onselect={selecttab} defaultactivekey={selectactive()} id="uncontrolled-tab-example" style={{ backgroundcolor: 'rgb(237 245 240 / 38%)' }}>
{selectactive() === "newpurchase" && (
<tab eventkey="newpurchase" title="new webshop">
<newpurchase/>
</tab>
)}
{selectactive() === "upgrade" && (
<tab eventkey="upgrade" title="existing webshop">
<upgrade/>
</tab>
)}
</tabs>
</col>
</row>
it will show / hide the tab depending upon the value returned from the function. by the way, your question needs more clarity
Source: stackoverflow.com
Related Query
- How to show the content and hide the content conditionally in react using hooks
- How to show and hide some columns on React Table?
- how to hide and show a div in react
- how to hide or show a div if checkbox is selected in React JS
- how to hide and show loading spinner - Activity Indicator react native, managing props and state
- How to hide the header from Tab navigation (bottom-tabs) in react navigation 5.x?
- React - how to use hooks to hide or show a component based on an onChange event
- How can show and hide react components using hooks
- React JS - How can I show / hide some parts of component based on URL path?
- how to show and hide popup only when promise is active ? React
- React MaterialTable editable row validation - how to show and hide error?
- How to hide a column on REACT Material table in all rows and show it on Edit for the Particular Row I am editing and Add Operations on new row adding?
- How to Hide and show HTML based on a cookie existing or not in a React App
- How to show and hide components in React to implement a multiple steps form?
- I want to show and hide a form on toggle of a radio button in React js . Im trying how to use react hooks to hide or show a component on onChange even
- How to show alert while closing the react application in browser tab
- In a React Component, how to conditionally show a style while iterating over a list
- How can I detect if a React component is completely loaded to show ot to hide a section?
- How to show hide html table rows using check boxes using react
- How to show or hide a particular Textfield inside loop react
- How to hide another divs on click? only single div should be show at a time in react js
- REACT JS How to show one component and hide the others on click
- How to hide and show a div in react js
- How to show or hide a button depending on the page in React
- React JS how to show password in input field for 5 seconds and then hide it?
- how to add code more in react to hide and show pages when I click again
- How to conditionally show element in react JSX?
- How can we show or hide components inside OverReact (library to build react components using dart ) according to conditions?
- how to hide and show in react on particular conditions
- How to conditionally show list items in React based on screen size
More Query from same tag
- reactjs Link onClick set props is undefined in child
- Enzyme+React expect component string - failed to parse selector
- Scrollable drop down lists in react-bootstrap
- How to wait while receiving a value from Useselector?
- How can I make my input field prefilled with data and editable on page load?
- onMouseLeave triggers when entering Element
- Problems with react card flip animation
- Why does useEffect doesn't update state on element delete
- Race Condition in React setState
- How can I use HighchartsReact with Ref? I want to use setChartOptions and update, but it is not possible
- React Redux | local state updating before global redux state
- Invalid hook call error occurs in Stripe + React
- Material Autocomplete does not work with InputProps
- how can I import components in next within a route
- How to access React class function inside Redux dispatch
- React Router not behaving as I would like it to
- I cannot get the updated value from the global state (REDUX) when I use Material-UI
- getting Cannot read property getDate of undefined error
- Getting errors while importing a forked repo as react.js dependencies
- Limit multiple selection in react
- how to check the response status and display content message accordingly in react js
- Unable to pass down state using react context
- Send multiple images from node js to frontend
- React js material ui problem box inside responsive drawer
- How do I fix React.js iOS blank screen?
- Next.js infinite reload from Docker container
- Override text "Actions" on material table head with "other text" or "icon"
- React get id value on click
- Maintain the context data for each child component on React router change
- Efficient migration strategy from OOP-based React to functional one?