Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging property data provider implementation #971

Closed
grigasp opened this issue Aug 14, 2024 · 0 comments · Fixed by #1040
Closed

Merging property data provider implementation #971

grigasp opened this issue Aug 14, 2024 · 0 comments · Fixed by #1040
Assignees
Labels
enhancement New feature or request presentation Issues that @itwin/itwinjs-core-presentation team is going to work on

Comments

@grigasp
Copy link
Member

grigasp commented Aug 14, 2024

There's a use case for showing properties of multiple data sources (imodels, but not necessarily just them) in a property grid. The property grid takes the properties through a IPropertyDataProvider interface. I believe the best approach would be to provide a function like createMergedPropertyDataProvider(providers: IPropertyDataProvider[]): MergingPropertyDataProvider. The merged provider should:

  • Trigger onDataChanged event whenever any of the merged providers do that.
  • Merge PropertyData objects from every provider into a single one. I imagine this may cause duplicate properties - that's okay, let's leave it up to consumers to ensure that there are no duplicates, either by nesting their property data under special categories or ensuring property labels are unique.
  • Provide ability to find the source provider, given a PropertyRecord - for editing cases we'll need to know where the property came from.
@grigasp grigasp added enhancement New feature or request presentation Issues that @itwin/itwinjs-core-presentation team is going to work on labels Aug 14, 2024
@grigasp grigasp assigned JonasDov and unassigned MartynasStrazdas Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request presentation Issues that @itwin/itwinjs-core-presentation team is going to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants