-
Notifications
You must be signed in to change notification settings - Fork 81
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
Lookup: In multiselect we are getting array of string instead of array of object #986
Lookup: In multiselect we are getting array of string instead of array of object #986
Comments
I dont think we can change this at this time. The Dirty event is just firing and giving you the string thats in the lookup field. That cant handle objects. try watching the change event instead...
I think this should give you the selectedRows object. Feel free to close if that works. |
Hello Tim, We are using change event already, please see URL: https://github.com/JangleShubham/enterprise-ng/blob/master/src/app/lookup/lookup.demo.html#L218 Thanks, |
I think the only thing "incorrect" is you dont use unique ID's so you cant use the value as a string. I did think that the change event would have objects but i was wrong... What about using the selected event? https://github.com/infor-design/enterprise-ng/blob/master/src/app/lookup/lookup-dialog.demo.html#L4 ? |
Hello Tim, |
Hmm yes your right. This example i think is just "left out" and shows datagrid. Im not seeing a selected event you can access on the lookup. But you can try to get to the underlying example maybe. Perhaps a solution here is to expose the selected event in the datagrid to the lookup. This will require some work we will have to schedule down the line. Perhaps you can find a workaround meanwhile on your end (using strings). I'm out of ideas than that for the moment |
@dhumalkishor Can you please tell us what team you're on? Thanks! |
Infor GRC |
Hi Tim, Can you please let me know when we can expect this issue will get fix? One of the our customer is waiting for this. Regards, |
I can try and add it to next version but we are moving to quarterly releases so will be end of Q3. I think a possible fix is to use the settings we added as intended. i.e. Set the field and the match option https://github.com/infor-design/enterprise/blob/main/src/components/lookup/lookup.js#L916 I think you might be able to just use that. If you can put the example up in a stack blitz https://stackblitz.com/edit/ids-quick-start-950 fork i can fork it and try it out for you. Here is the running example: https://main-enterprise.demo.design.infor.com/components/lookup/test-custom-matching.html |
In which version we get above mentioned code? |
Any version.. Been there for a long time. https://github.com/infor-design/enterprise-ng/blob/main/projects/ids-enterprise-ng/src/lib/lookup/soho-lookup.component.ts#L230 |
Hello Tim, We checked with latest SOHO version and tried with stackbliz code you shared.
If there is some turnaround for all this please let us know. Thanks, |
Did you checkout the match example? Basically it's just a function that you set the code in the settings it runs when trying to find the selected items. Is it possible to make a very simple example that just shows the problem (seems like a lot in this one and im not sure where the code is?) My other suggestions/ideas would be to use a unique key here for matching. Or maybe even use the multiselect https://master-enterprise.demo.design.infor.com/components/multiselect/example-index.html |
@dhumalkishor this should be working now. we had to add an example with NON unique ids in the field. I still think you should use the component as intended but we exposed See the new example: You can do it this way or you could just use Also these events are in 10.2.0 and 4.53.2 |
Hello @tmcconechy , Thanks for the extra events to handle this. It seems to be working. Thanks, |
Hi Tim, We found one more issue with multiselect lookup. Please refer below steps to reproduce the same.
It should remove only one record. Regards, |
@deep7102 do you want to look into these two cases or should I? Thanks |
No not yet needs to be investigated by one of us. Since i can connect very well right now can you have a look? Ideally we just can update the example and make it work |
This has been QA tested and passed on v4.54.0-dev. https://main-enterprise.demo.design.infor.com/components/lookup/test-multiselect-description-only.html Moving this ticket to Done. Thanks! |
@dhumalkishor and @JangleShubham all additional fixes are merged and patched into 4.53.4 also made an NG version patch with the fix https://www.npmjs.com/package/ids-enterprise-ng/v/10.2.1 |
This issue is now resolved. |
Hello @tmcconechy , Thanks for the update and issues reported last time seems to be resolved. In GRC application, when we select records, it gets displayed below the lookup control as a soho list view and this list view has a cancel/delete button as well. We have iterated the list we get in event (selected) and used as onSelected in component level. When user click on cancel/delete button of list, we have removed the items from list this.previouslySelectedRows and also from array model.desc(ngModel). But after this as well it shows those records which were cancelled/deleted. Are we missing something? Please let us know if more details required from our side. Thanks, |
@JangleShubham wha you just added i dont 100% follow. I think we should make a follow up issue with simple steps to reproduce? I dont get how its got now a "lookup control as a soho list view and this list view has a cancel/delete button as well.". This seems like something entirely new as i've never seen a lookup with a listview. But anyways this issue is already very confusing so lets start with a new issue. If its small i'd like to save it for later |
Hello @tmcconechy , In short we just want a way to unselect the record without opening lookup popup. We are using below code to show selected records in afterpaging event:
I think we should we go with same issue as we can't go ahead with this issue. Thanks, |
OK whats the part about listview? that's what is confusing. Can you modify the existing example in the repo so we can try what your doing? So we can try what your talking about / trying to do? From what you say about "unselect the record without opening lookup popup". This might be difficult as the lookup is managing the state as well. |
Hi @JangleShubham I think instead of use that |
lookup unselect after clicking on cancel/delete button reproduced for issue: infor-design#986
lookup unselect after clicking on cancel/delete button reproduced for issue: infor-design#986
Hello @tmcconechy / @deep7102 , @dhumalkishor can you explain use case for this? Thanks, |
Thanks first did you try @deep7102 answer. That actually sounds like it could work. #986 (comment) |
Hello @tmcconechy and @deep7102 , |
Your welcome, we're glad it works now 😓 👍🏻 |
Describe the bug
In lookup control we are getting array of string instead of array of object when we select more than 6 records.
We have forked and made our changes in https://github.com/JangleShubham/enterprise-ng
Please install this project and run it and go to the path http://localhost:4200/ids-enterprise-ng-demo/lookup.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should provide array of object.
Version
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Additional context
As we deals with ids and because if this issue when we get array of string we can't get id assigned to object.
The text was updated successfully, but these errors were encountered: