Skip to content

MDC TableDelegate PropertyInfo position property #4254

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

Open
maximkadrov opened this issue Apr 8, 2025 · 5 comments
Open

MDC TableDelegate PropertyInfo position property #4254

maximkadrov opened this issue Apr 8, 2025 · 5 comments
Assignees

Comments

@maximkadrov
Copy link

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

@plamenivanov91
Copy link
Contributor

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

@simlin
Copy link
Contributor

simlin commented Apr 16, 2025

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

@maximkadrov
Copy link
Author

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

@simlin
Copy link
Contributor

simlin commented Apr 17, 2025

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

@maximkadrov
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants