Created
April 15, 2019 09:56
-
-
Save ciaranha/b236ee3d199af7702533207152552a84 to your computer and use it in GitHub Desktop.
airtable api
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
// with sorting | |
componentDidMount() { | |
base('Stops').select({ | |
view: 'Grid view', | |
sort: [ | |
{field: 'Days (planned)', direction: 'asc'} | |
], | |
}) | |
.eachPage( | |
(records, fetchNextPage) => { | |
this.setState({ | |
records | |
}); | |
console.log(records); | |
fetchNextPage(); | |
} | |
); | |
} | |
//original | |
componentDidMount() { | |
base('Stops').select({view: 'Grid view'}) | |
.eachPage( | |
(records, fetchNextPage) => { | |
this.setState({ | |
records | |
}); | |
console.log(records); | |
fetchNextPage(); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment