openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

MDC TableDelegate PropertyInfo position property

Open maximkadrov opened this issue 9 months ago • 7 comments

Why are you proposing this feature?

I am experiencing issue with ordering columns in mdc table for the columns that are not set up as initially visible.

By default, for the defined properties in JSONPropertyInfo we don't have position property for MDC table and it being automatically set as -1

By default, it sorted based on that position field which is defined for the xml-view defined columns, but not for the JSONPropertyInfo full descriptor and instead of it order is alphabetical

So I kindly request to add position into PropertyInfo

How should a possible solution look like?

Addition of position property and its consideration into the rendering logic

Are there alternative approaches?

No response

Any further information you would like to share?

No response

maximkadrov avatar Apr 08 '25 10:04 maximkadrov

Hello @maximkadrov ,

Thank you for sharing your enhancement proposal. I've created an internal incident DINC0465907. The status of the issue will be updated here in GitHub.

Regards, Plamen Ivanov

plamenivanov91 avatar Apr 08 '25 12:04 plamenivanov91

Hello @maximkadrov ,

have I understood it right, that you want to influence the order of the not visible columns in the personalization dialog of the table? What do you have in mind as alternative to an alphabetical sorting? Can you please describe a bit more your usecase?

Thanks and Best Regards Jens

simlin avatar Apr 16 '25 08:04 simlin

Hello @simlin,

Yes, exactly that thing, right now I am using MDC controls to render the table:

  1. I have a couple of columns in XML view (for initial visibility) and the configuration of them has position property here

  2. But all of the columns are described in the JSONPropertyInfo which is used in the TableDelegate for MDC

My request would be to add position column here (just an example):

			{
				key: 'propID',
				label: 'PropID',
				path: 'prodID',
				dataType: 'sap.ui.model.odata.type.String',
                                position: 5, <--- my request
				visualSettings: {
					widthCalculation: {
						maxWidth: 7,
						minWidth: 7,
					},
				},
			}

Thanks Regards

maximkadrov avatar Apr 17 '25 08:04 maximkadrov

Hello @maximkadrov,

yes, I understood that part.

The design of columns panel in the personalization dialog of the table currently defines that the visible columns should be displayed first in the order in which they appear on the UI. They are followed by the not visible columns in alphabetical order. The position information is an internal information of the personalization dialog which is used to sort the list in the described way.

What's the reason behind that you want to change the order of the columns in the personalization dialog?

Best Regards Jens

simlin avatar Apr 17 '25 08:04 simlin

@simlin

Thanks for the quick response, the reason for that request is following:

  1. I agreed that alphabetical order by default is logical solution
  2. The reason for it - user wants the order of the columns as they located in xlsx report (for the initial visible columns it's ok) but when user selects the rest of the columns it's not in the correct order

maximkadrov avatar Apr 17 '25 11:04 maximkadrov

Hello, would it be possible to implement this enhancement?

Regards

Maksim

maximkadrov avatar May 15 '25 11:05 maximkadrov

Dear Maxim,

thanks for the inquiry and the suggestion for improvement. I understand, that it makes sense for your use case. Yet we will not provide it at the moment, because we have a rework of the design in progress, which will make the ordering of the unused columns obsolete. They will move to another place in the UI and I am not sure, if ordering makes a difference there. I will forward the feedback to our designers, so they can consider and possibly incorporate it.

Best regards Benedikt

bendkt avatar May 19 '25 07:05 bendkt