Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146295 | Jul 30,2019 09:15 AM UTC | Oct 12,2020 12:55 PM UTC | React - EJ 2 | 5 |
![]() |
Tags: Tab |
export class Default extends SampleBase {
state = { count: 0}
handleIncrement = () => {
this.setState({ count: this.state.count + 1})
}
handleDecrement = () => {
this.setState({ count: this.state.count - 1})
}
template1(data) {
return (
<TextBoxComponent placeholder="First Name" floatLabelType="Auto" value={data.text} />
);
}
headertext = [{ text: "Rome" }, { text: "Paris" }, { text: "London" }];
render() {
return (<div className='control-pane'>
<div className='control-section input-content-wrapper'>
<div className="row custom-margin custom-padding-5">
<TabComponent ref={(tab) => { this.tabObj = tab }} showCloseButton={true} heightAdjustMode='None' height={320}>
<TabItemsDirective>
<TabItemDirective header={this.headertext[0]}
content={{
template: this.template1,
data: { text: this.state.count }
}} />
</TabItemsDirective>
</TabComponent>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<input type="text" id="text1" value={this.state.count} />
</div>
<button onClick={this.handleIncrement}>Increment by 1</button>
<button onClick={this.handleDecrement}>Decrement by 1</button>
</div>
</div>
</div>);
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.