This commit is contained in:
geek 2017-05-31 18:34:45 +09:00
parent 9d920efbde
commit e7aa727977

View File

@ -77,19 +77,31 @@ export class WaitForAuth extends React.Component<any, any> {
open: false, open: false,
}; };
handleCellClick = (e: any, idx: number) => { sselectedRows: number[] | string;
console.log(e)
this.setState({open:true}) // handleCellClick = (e: any, idx: number) => {
} // console.log(e)
// }
handleRowSelected = (selectedRows: number[] | string) => { handleRowSelected = (selectedRows: number[] | string) => {
// console.log(selectedRows) // console.log(selectedRows)
// this.setState({ open: true })
this.sselectedRows = selectedRows;
} }
handleClose = () => { handleClose = () => {
this.setState({ open: false }); this.setState({ open: false });
}; };
handleOpenDialog = () => {
this.setState({ open: true })
// console.log(this.sselectedRows)
}
handleSubmit = () => {
console.log("Agent Auth Service Request: " + this.sselectedRows)
}
render() { render() {
const actions = [ const actions = [
<FlatButton <FlatButton
@ -100,8 +112,8 @@ export class WaitForAuth extends React.Component<any, any> {
<FlatButton <FlatButton
label="Submit" label="Submit"
primary={true} primary={true}
disabled={true} disabled={false}
onTouchTap={this.handleClose} onTouchTap={this.handleSubmit}
/>, />,
] ]
return ( return (
@ -110,7 +122,7 @@ export class WaitForAuth extends React.Component<any, any> {
<Table <Table
selectable={this.state.selectable} selectable={this.state.selectable}
multiSelectable={this.state.multiSelectable} multiSelectable={this.state.multiSelectable}
onCellClick={this.handleCellClick} /*onCellClick={this.handleCellClick}*/
onRowSelection={this.handleRowSelected} onRowSelection={this.handleRowSelected}
> >
<TableHeader <TableHeader
@ -138,7 +150,7 @@ export class WaitForAuth extends React.Component<any, any> {
<TableRowColumn>{row.status}</TableRowColumn> <TableRowColumn>{row.status}</TableRowColumn>
</TableRow> </TableRow>
))}; ))};
</TableBody> </TableBody>
<TableFooter <TableFooter
adjustForCheckbox={this.state.showCheckboxes} > adjustForCheckbox={this.state.showCheckboxes} >
@ -147,12 +159,26 @@ export class WaitForAuth extends React.Component<any, any> {
actions={actions} actions={actions}
modal={true} modal={true}
open={this.state.open} > open={this.state.open} >
Agent를 ? Agent를 ?
</Dialog > </Dialog >
</TableFooter> </TableFooter>
</Table> </Table>
<FlatButton
style={{float:'right'}}
label="Submit"
primary={true}
onTouchTap={this.handleOpenDialog}
/>
<FlatButton
style={{float:'right' }}
label="Cancel"
primary={true}
onTouchTap={this.handleClose}
/>
</div> </div>
</MuiThemeProvider> </MuiThemeProvider>
); );
} }
} }