PresentationPropertyDataProvider Class

Presentation Rules-driven property data provider implementation.

Extends

Implements

Methods

Name Description
constructor(imodel: IModelConnection, rulesetId?: string): PresentationPropertyDataProvider Constructor  
dispose(): void Dispose the presentation property data provider.  
getData(): Promise<PropertyData> Returns property data.  
getDescriptorOverrides(): DescriptorOverrides Protected Provides content configuration for the property grid  
invalidateCache(props: CacheInvalidationProps): void Protected Invalidates cached content and clears categorized data.  
isFieldFavorite(field: Field): boolean Protected Should the specified field be included in the favorites category.  
isFieldHidden(field: Field): boolean Protected Hides the computed display label field from the list of properties  
shouldConfigureContentDescriptor(): boolean Protected Tells the data provider to not request descriptor and instead configure  
sortCategories(categories: CategoryDescription[]): void Protected Sorts the specified list of categories by priority.  
sortFields(_category: CategoryDescription, fields: Field[]): void Protected Sorts the specified list of fields by priority.  

Inherited methods

Name Inherited from Description
configureContentDescriptor(descriptor: Readonly<Descriptor>): Descriptor Protected ContentDataProvider Called to configure the content descriptor.
getContent(pageOptions?: PageOptions): Promise<Content | undefined> ContentDataProvider Get the content.
getContentSetSize(): Promise<number> ContentDataProvider Get the number of content records.
getFieldByPropertyRecord(propertyRecord: PropertyRecord): Promise<Field | undefined> ContentDataProvider Get field using PropertyRecord.
shouldExcludeFromDescriptor(field: Field): boolean Protected ContentDataProvider Called to check whether the field should be excluded from the descriptor.
shouldRequestContentForEmptyKeyset(): boolean Protected ContentDataProvider Called to check if content should be requested even when keys is empty.

Properties

Name Type Description
getMemoizedData Protected (Anonymous function) & MemoizedFunction Returns property data.  
includeFieldsWithCompositeValues Accessor boolean Should fields with composite values be included in the property list.  
includeFieldsWithNoValues Accessor boolean Should fields with no values be included in the property list.  
onDataChanged PropertyDataChangeEvent    

Inherited properties

Name Type Inherited from Description
displayType Accessor ReadOnly string ContentDataProvider Display type used to format content
getContentDescriptor (Anonymous function) & MemoizedFunction ContentDataProvider Get the content descriptor.
imodel Accessor IModelConnection ContentDataProvider IModel to pull data from
keys Accessor KeySet ContentDataProvider Keys defining what to request content for
pagingSize Accessor number | undefined ContentDataProvider Paging options for obtaining content.

Presentation data providers, when used with paging, have ability to save one backend request for size / count. That
can only be achieved when pagingSize property is set on the data provider and it's value matches size which is used when
requesting content. To help developers notice this problem, data provider emits a warning similar to this:
<br>ContentDataProvider.pagingSize doesn't match pageOptions in ContentDataProvider.getContent call. Make sure you set provider's pagingSize to avoid excessive backend requests.<br>
To fix the issue, developers should make sure the page size used for requesting data is also set for the data provider:
TS<br>const pageSize = 10;<br>const provider = new ContentDataProvider(imodel, rulesetId, displayType);<br>provider.pagingSize = pageSize;<br>// only one backend request is made for the two following requests:<br>provider.getContentSetSize();<br>provider.getContent({ start: 0, size: pageSize });<br>
rulesetId Accessor string ContentDataProvider Id of the ruleset to use when requesting content
selectionInfo Accessor SelectionInfo ContentDataProvider Information about selection event that results in content change

Defined in

Last Updated: 13 June, 2024