Skip to content

[Property Grid] Property value for multiple selection when alwaysShowEditor is true #1547

Description

@Emi1yZhang

Package
@itwin/property-grid-react

Describe the bug
We have a rule 'alwaysShowEditor' to always display the editor.
We have two vertices with different radius values:

  • Vertex [2-MC]: 45.0 ft
  • Vertex [2-M9]: 41.0 ft
Image Image

When selecting both [2-M9] and [2-MC] at the same time, the property grid displays a single value of 40.49 ft, which does not match either value.
Image

The property records provided in our getData override appear to be correct.

{
value: {
valueFormat: 0,
},
property: {
typename: "double",
name: "pc_opnsite_AreaVertex_Radius",
displayLabel: "Radius",
kindOfQuantityName: "CivilUnits:LENGTH",
quantityType: "CivilUnits:LENGTH",
editor: {
name: "presentation-quantity-editor",
},
},
description: undefined,
isReadonly: undefined,
isDisabled: undefined,
isMerged: true,
autoExpand: false,
extendedData: undefined,
links: undefined,
imodelKey: "38e911a1-4749-485b-a677-563a1b867d2c",
}

If alwaysShowEditor is turned off, the property grid correctly shows “Varies”, indicating that the underlying data is valid. This suggests a potential issue related to alwaysShowEditor.

Image

I also noticed that:

  • Records with string values (e.g. ECInstanceId, Location) behave correctly.
  • Records that use a formatter exhibit this issue when alwaysShowEditor is enabled.
    This seems to indicate a bug in how formatted numeric values are handled when alwaysShowEditor is true.

Desktop (please complete the applicable information):

  • OS: Windows
  • Browser: Electron 36.9.1
  • iTwin.js Version 5.4.2
  • @itwin/property-grid-react 1.19.5

Metadata

Metadata

Labels

property widgetProperty grid widget and its components related issues

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions