Answer the question
In order to leave comments, you need to log in
How to add span by condition?
Good afternoon!
Tell me please.
How to add a span to the table, as in the screenshot:
Now, this condition is implemented like this:
if (el === 'pool_1') {
return (
<div>
<span>{el}</span>
<FormattedMessage id="s3.migration">
{(txt) => <a className="datastore__migration">{txt}</a>}
</FormattedMessage>
</div>
)
}
return <span>{el}</span>
Answer the question
In order to leave comments, you need to log in
It is difficult to understand what is required based on the question. But I can predict that it is required to show the element based on the availability of data for this element. In this case, you can do this:
If you need to add a block below, then you can simply add this tag to the return block.
Here you need to understand that after calling return, the execution of the render() function will stop.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question