Contains information about a view that isn't loaded by default e.g. field order and visible fields.
In a React component, we recommend using useViewMetadata instead.
Press shift + S to search API reference.
Contains information about a view that isn't loaded by default e.g. field order and visible fields.
In a React component, we recommend using useViewMetadata instead.
async function loadMetadataForViewAsync(view) {const viewMetadata = view.selectMetadata();await viewMetadata.loadDataAsync();console.log(viewMetadata.visibleFields);// => [Field, Field, Field]console.log(viewMetadata.allFields);// => [Field, Field, Field, Field, Field]viewMetadata.unloadData();}
class ViewMetadataQueryResult extends AbstractModelWithAsyncData<ViewMetadata, WatchableViewMetadataKey>
readonly allFields | Array<Field> Returns every field in the table in the order they appear in this view. Watchable. |
readonly id | string The ID for this model. |
readonly isDataLoaded | boolean |
readonly isDeleted | boolean |
readonly visibleFields | Array<Field> Returns every field visible in this view. Watchable. |
parentView | View |
loadDataAsync | function () => Promise<void> Will cause all the async data to be fetched and retained. Every call to
Returns a Promise that will resolve once the data is loaded. |
toString | function () => string A string representation of the model for use in debugging. |
unloadData | function () => void |
unwatch | function (keys: WatchableViewMetadataKey | ReadonlyArray<WatchableViewMetadataKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null) => Array<WatchableViewMetadataKey> Unwatching a key that needs to load data asynchronously will automatically cause the data to be released. Once the data is available, the callback will be called. |
watch | function (keys: WatchableViewMetadataKey | ReadonlyArray<WatchableViewMetadataKey>, callback: FlowAnyFunction, context?: FlowAnyObject | null) => Array<WatchableViewMetadataKey> Watching a key that needs to load data asynchronously will automatically cause the data to be fetched. Once the data is available, the callback will be called. |