Closed gadgetto closed 5 years ago
It looks like all (or most) modx-combo variants have this issue.
The template-combo works as expected.
Yes, but it fetches the whole templates with limit:0 for some reason. Seems that the store is filtering the data for the pagination.
@gadgetto Is this issue fixed already? I can't seem to reproduce this issue in branch 2.x.
You need a big user list > 20 users to reproduce this. I still can reproduce this.
@gadgetto Ahh I see, the problem occurs when you have a listbox which has pagination. If you have a value preselected which is being retrieved on page 1 of the listbox options all is fine. However if you have a preselected value which is not being retrieved yet (so its on page 2 or further on in the listbox) the name is not yet retrieved so it is displaying the value instead.
I'm thinking, maybe a render value method should run, which performs an ajax request to retrieve the name for the selected user?
It could be fixed with the code from @gadgetto at the start of this thread.
Solved. PR is merged.
Summary
Using an extjs modx-combo-user and trying to preselect a user when combo is loaded doesn't render the username but it's ID instead.
Step to reproduce
Observed behavior
Doesn't render the username of preselected user but it's ID instead.
Expected behavior
Should render username of the preselected user.
Environment
MODX version: 2.5.4-pl
Can be fixed by adding the following lines to:
https://github.com/modxcms/revolution/blob/2.x/core/model/modx/processors/security/user/getlist.class.php#L35