Hi, I tired below code but not work. pls help me
is={'site.journeyType === Journey.sitename ? false : true'} key={'product-code'} nodeId={'product--id'} label={'Product name'} onClick={() => openbookDocument('12342113')} endIcon={
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aravind GovindarajPosted Jun 12, 2023, 11:46 AM
Please find the example for the same
n the example above, we use the
useStatehook to create ahideLabelstate variable and asetHideLabelfunction to toggle its value. The label is conditionally rendered based on thehideLabelstate. IfhideLabelisfalse, the label will be displayed; otherwise, it will be hidden.Clicking the "Toggle Label" button will call the
toggleLabelVisibilityfunction, which will update thehideLabelstate, thereby toggling the visibility of the label.By managing the visibility state with a boolean value and conditionally rendering the label component based on that value, you can effectively hide or show the label dynamically in your React application.