Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanding example code #5

Open
clearlynow opened this issue Aug 20, 2021 · 0 comments
Open

Expanding example code #5

clearlynow opened this issue Aug 20, 2021 · 0 comments

Comments

@clearlynow
Copy link

In the example project, there is only one record used locally.

/// Updates local state using the provided Record
/// - Parameter record: The record from which to get the data
   private func update(with record: AirtableKit.Record) {
       self.record = record
       self.state.name = record.name ?? ""
       self.state.age = record.age ?? 0
       self.state.isCool = record.isCool ?? false
       self.state.createdTime = record.createdTime ?? Date()
       self.state.updatedTime = record.updatedTime ?? Date()
       self.state.imageUrl = record.attachments["image"]?.first?.url ?? URL(string: AppState.placeholderStringUrl)!

I have struggled to figure out how to access a table that may contain multiple records to use locally as an array of records? So the entire table data could be displayed as a list? If given some guidance, I'd happily contribute expanded example code to show how this could be done. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant