Hi everyone,
I have a Documents InlineRepeat that I would like to have the multiselection feature.
It seems to me that this feature is only available for an overview. I did a workaround that I added a ConfirmType field to the Documents and a Select All button.
I also implemented the toggle for the Select All button like this:
const rows = _.get(documentFromActivity.document, path.split('/').filter(key => key)) as any[];
const allSelected = rows.every(row => row.Select === true);
rows.forEach(row => {
row.Select = allSelected ? null : true;
});
yield putResolve(ActivityActions.save.started({ activityId: activity.id }));
It only works when I add yield putResolve(ActivityActions.save.started({ activityId: activity.id })); But it will show a spinner for the whole screen when I click that button because the activity is saved.
So, how can I trigger a re-render without calling save? Or do we have a native way or a better way to have the multiselection for InlineRepeat?
And another question: Do we have api for the bulk download feature that zips all the attachments? Right now I am just downloading each file separately using AttachmentLoader.retrieveDownloadLink
Hi @cuong-wintry-haze ,
you are right, a select all option currently doesn’t exist for Repeats and there is way to achieve your desired functionality purely by modeling. A bulk download API for attachments does not exist either.
Functionality like this could be added to general A12 repeats if your project is interested. Something similar that already exists is a multi upload function for repeats. We can help you create a necessary requirement ticket.
Your current workaround looks like a reasonable solution. An alternative approach might be to replace the repeat widget as described in the tutorials and render the Table widget which has multiselect functionality.
Hi @patrick-long-drift,
Thanks for your feedback!
Yes, we would very much like to get this functionality into the platform instead of keeping our local workaround. Could you help me create two tickets? One is for the multiselection in InlineRepeat, and the other is the bulk download API (input: list of attachments, output: zipped file).
Or let us know where we should open them ourselves.
Thanks for identifying these two gaps:
- Multi-selection in Form Model Repeats
- Bulk Download API
@cuong-wintry-haze and I have informed the development teams but we didn’t create a ticket as these are nice-to-have features and not high priority for the project.