i started an app and try to show table fields in my app
i used a code from guides as axemple, but when i request fields by their names it shows as undefined, but field record.id is displayed ok
i have table with wields Title, Price etc, but only record.id have value in app, but in table all fields have value
my code
import {
initializeBlock,
useBase,
useRecords,
} from '@airtable/blocks/ui';
import React from 'react';
function HelloWorldApp() {
// YOUR CODE GOES HERE
const base = useBase();
const table = base.getTableByName('events');
const records = useRecords(table);
const events = records.map(record => {
return (
<div key={record.id}>
{record.Price || 'not named record'}
</div>
);
});
return (
<div>{events}</div>
);
}
initializeBlock(() => <HelloWorldApp />);