Improve react examples

This commit is contained in:
Sean Landsman
2017-09-15 16:56:08 +01:00
parent c4310c2768
commit ad6bc068b2
26 changed files with 525 additions and 192 deletions

View File

@@ -66,10 +66,10 @@ export default class FilterComponentExample extends Component {
render() {
return (
<div style={{height: 400, width: 945}}
<div style={{height: 400, width: 900}}
className="ag-fresh">
<h1>Filter Component Example</h1>
<button style={{marginBottom: 10}} onClick={this.onClicked}>Filter Instance Method</button>
<button style={{marginBottom: 10}} onClick={this.onClicked} className="btn btn-primary">Filter Instance Method</button>
<AgGridReact
// properties
columnDefs={this.state.columnDefs}

View File

@@ -7,7 +7,8 @@ export default class PartialMatchFilter extends Component {
this.state = {
text: ''
}
};
this.valueGetter = this.props.valueGetter;
this.onChange = this.onChange.bind(this);
@@ -63,8 +64,17 @@ export default class PartialMatchFilter extends Component {
}
render() {
let style = {
border: "2px solid #22ff22",
borderRadius: "5px",
backgroundColor: "#bbffbb",
width: "200px",
height: "50px"
};
return (
<span>Filter: <input style={{height: "20px"}} ref="input" value={this.state.text} onChange={this.onChange}/></span>
<div style={style}>Filter: <input style={{height: "20px"}} ref="input" value={this.state.text}
onChange={this.onChange} className="form-control"/></div>
);
}
};