Is your feature request related to a problem? Please describe.
When adding a member to a group, searching through connections returns even archived contacts. When many contacts have been archived in a system either because of duplicates or other issues, the archived items fill up the list needlessly.
Describe the solution you'd like
Since normal users don't have the ability to fully delete records, archiving is the equivalent, so those records shouldn't be shown in the connections list.
Technically, those fields use the /wp-json/dt-posts/v2/{post-type}/compact?s= endpoint. We should add a query parameter for whether to include archived posts or not. I would love if it did NOT include them by default and you had to add &archived=1 in order to include them, but I know there's a chance that breaks some other functionality. I'm option to have to add &archived=0 in order to remove them from the list.
Describe alternatives you've considered
Some sort of toggle on connection fields for archived posts, but that's complicated and I don't know a use case where users would want to get archived posts. If there is a case somewhere in a specific view, it's probably related to the context around that view/page and it could be adjusted programmatically. It might be helpful to have an attribute on the dt-connections component that would include/exclude archived items and that would map to the query parameter on the API.
Is your feature request related to a problem? Please describe.
When adding a member to a group, searching through connections returns even archived contacts. When many contacts have been archived in a system either because of duplicates or other issues, the archived items fill up the list needlessly.
Describe the solution you'd like
Since normal users don't have the ability to fully delete records, archiving is the equivalent, so those records shouldn't be shown in the connections list.
Technically, those fields use the
/wp-json/dt-posts/v2/{post-type}/compact?s=endpoint. We should add a query parameter for whether to include archived posts or not. I would love if it did NOT include them by default and you had to add&archived=1in order to include them, but I know there's a chance that breaks some other functionality. I'm option to have to add&archived=0in order to remove them from the list.Describe alternatives you've considered
Some sort of toggle on connection fields for archived posts, but that's complicated and I don't know a use case where users would want to get archived posts. If there is a case somewhere in a specific view, it's probably related to the context around that view/page and it could be adjusted programmatically. It might be helpful to have an attribute on the dt-connections component that would include/exclude archived items and that would map to the query parameter on the API.