Merge branch 'feature/flamelinkCollections' into develop
This commit is contained in:
@@ -6,26 +6,31 @@ class About extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
global.schemaName = 'martenSchemaDemo';
|
||||
global.schemaName = 'martenAbout';
|
||||
|
||||
this.state = {
|
||||
schemaDetails: '',
|
||||
schemaType: '',
|
||||
}
|
||||
|
||||
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options' ] })
|
||||
.then(result => this.setState({
|
||||
schemaDetails: result
|
||||
}))
|
||||
}
|
||||
|
||||
flamelinkApp.schemas.get(global.schemaName)
|
||||
.then(result => this.setState({
|
||||
schemaType: result.type
|
||||
}))
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Fragment>
|
||||
<FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails}/>
|
||||
<FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails} schemaType = {this.state.schemaType}/>
|
||||
</Fragment>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,12 +10,18 @@ class Home extends Component {
|
||||
|
||||
this.state = {
|
||||
schemaDetails: '',
|
||||
schemaType: '',
|
||||
}
|
||||
|
||||
flamelinkApp.schemas.getFields(global.schemaName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] })
|
||||
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options'] })
|
||||
.then(result => this.setState({
|
||||
schemaDetails: result
|
||||
}))
|
||||
|
||||
flamelinkApp.schemas.get(global.schemaName)
|
||||
.then(result => this.setState({
|
||||
schemaType: result.type
|
||||
}))
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
@@ -24,7 +30,7 @@ class Home extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<FlameLinkComponentCreations schemaDetails={this.state.schemaDetails} />
|
||||
<FlameLinkComponentCreations schemaDetails={this.state.schemaDetails} schemaType = {this.state.schemaType}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user