Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.46 KB

README.md

File metadata and controls

36 lines (23 loc) · 1.46 KB

Table structure extension

This example extension and shows the table description as well as field names, descriptions, types and options for the table and view the user is currently viewing.

The code shows:

  • How to use the Cursor API to detect which table and view the user is viewing.

  • How to use the useBase and useViewMetadata hooks to read and watch for changes to base and view metadata.

  • How to display table and field metadata, including names, descriptions, and field types.

  • How to use @airtable/blocks/ui components like <Box>, <Heading>, <Text> and <FieldIcon> to style your extension.

How to run this extension

  1. Create a new base using the Digital video production template. (You can also use an existing base or a different template: this extension doesn't depend on any specific attributes from that template.)

  2. Create a new extension in your new base (see Create a new extension), selecting "Table structure" as your template.

  3. From the root of your new extension, run block run.

Note: The template base does not have table or field descriptions set. It's expected for the extension to initially look a bit empty!

See the extension running

Extension that shows information about the selected table and its fields