A class that represents an Airtable view. Every Table has one or more views.
Members
class View extends AbstractModel<ViewData, WatchableViewKey>
readonly id | string The ID for this model. | ||||||
readonly isDeleted | boolean
In general, it's best to avoid keeping a reference to an object past the
current event loop, since it may be deleted and trying to access any data
of a deleted object (other than its ID) will throw. But if you keep a
reference, you can use | ||||||
readonly isLockedView | boolean If the view is locked. Can be watched.
| ||||||
readonly name | string The name of the view. Can be watched.
| ||||||
readonly type | ViewType The type of the view, such as Grid, Calendar, or Kanban. Should never change because view types cannot be modified.
| ||||||
readonly url | string The URL for the view. You can visit this URL in the browser to be taken to the view in the Airtable UI.
| ||||||
selectMetadata | function () => ViewMetadataQueryResult Select the field order and visible fields from the view. Returns a ViewMetadataQueryResult. Consider using useViewMetadata instead if you're creating a React UI. The
useViewMetadata hook handles loading/unloading and updating your UI automatically,
but manually
| ||||||
selectMetadataAsync | function () => Promise<ViewMetadataQueryResult> Select and load the field order and visible fields from the view. Returns a ViewMetadataQueryResult promise where the metadata has already been loaded. Consider using useViewMetadata instead if you're creating a React UI. The
useViewMetadata hook handles loading/unloading and updating your UI automatically,
but manually
| ||||||
selectRecords | function (opts: RecordQueryResultOpts = {}) => TableOrViewQueryResult
Select records from the view. Returns a RecordQueryResult. Consider using useRecords or useRecordIds instead, unless you need the
features of a QueryResult (e.g.
| ||||||
selectRecordsAsync | function (opts: RecordQueryResultOpts = {}) => Promise<TableOrViewQueryResult>
Select and load records from the view. Returns a RecordQueryResult promise where record data has been loaded. Consider using useRecords or useRecordIds instead, unless you need the
features of a QueryResult (e.g. Once you've finished with your query, remember to call
| ||||||
toString | function () => string A string representation of the model for use in debugging. | ||||||
unwatch | function (keys: WatchableViewKey | ReadonlyArray<WatchableViewKey>, callback:
Unwatch keys watched with Should be called with the same arguments given to Returns the array of keys that were unwatched. | ||||||
watch | function (keys: WatchableViewKey | ReadonlyArray<WatchableViewKey>, callback:
Get notified of changes to the model. Every call to Returns the array of keys that were watched. |