-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug fixed
- Loading branch information
Showing
8 changed files
with
191 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
docs/src/app/components/pages/components/auto-complete.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
const React = require('react'); | ||
|
||
const { AutoComplete } = require('material-ui'); | ||
const ComponentDoc = require('../../component-doc'); | ||
|
||
const Code = require('auto-complete-code'); | ||
|
||
class AutoCompletePage extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
|
||
let desc = null; | ||
|
||
return ( | ||
<ComponentDoc | ||
name="Auto Complete" | ||
code={Code} | ||
desc={desc} | ||
componentInfo={[{ | ||
name: 'Auto Complete', | ||
infoArray: [], | ||
}]}> | ||
|
||
<br/> | ||
|
||
<div> | ||
<AutoComplete | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
|
||
<AutoComplete | ||
fullWidth = {true} | ||
hintText = "hint" | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
|
||
<AutoComplete | ||
fullWidth={true} | ||
searchText= "***************" | ||
errorText= "error message" | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
|
||
<AutoComplete | ||
fullWidth={true} | ||
hintText = "type here" | ||
onUpdateRequests={(t) => { | ||
console.log(t); | ||
return [ | ||
(<AutoComplete.Item primaryText={t} secondaryText="☺" />), | ||
(<AutoComplete.Divider/>), | ||
(<AutoComplete.Item primaryText={t.toUpperCase()} secondaryText="⚝" />), | ||
]; | ||
}} | ||
onNewRequest={(t, index) => {console.log('request:'+index);}} /> | ||
|
||
|
||
<AutoComplete | ||
floatingLabelText = "floating Label" | ||
dataSource = {["12345", "23456", "34567"]} /> | ||
|
||
<AutoComplete | ||
fullWidth={true} | ||
floatingLabelText = "auto" | ||
auto = {true} | ||
dataSource = {["12345", "23456", "34567"]} /> | ||
|
||
</div> | ||
|
||
</ComponentDoc> | ||
); | ||
|
||
} | ||
|
||
|
||
} | ||
|
||
module.exports = AutoCompletePage; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<AutoComplete | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
<AutoComplete | ||
fullWidth = {true} | ||
hintText = "hint" | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
|
||
<AutoComplete | ||
fullWidth={true} | ||
searchText= "***************" | ||
errorText= "error message" | ||
onUpdateRequests={(t) => {console.log(t); return [t, t+t, t+t+t];}} | ||
onNewRequest={(t) => {console.log('request:'+t);}} /> | ||
|
||
<AutoComplete | ||
fullWidth={true} | ||
hintText = "type here" | ||
onUpdateRequests={(t) => { | ||
console.log(t); | ||
return [ | ||
(<AutoComplete.Item primaryText={t} secondaryText="☺" />), | ||
(<AutoComplete.Divider/>), | ||
(<AutoComplete.Item primaryText={t.toUpperCase()} secondaryText="⚝" />) | ||
]; | ||
}} | ||
onNewRequest={(t,index) => {console.log('request:'+index);}} /> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.