Open puneetlath opened 1 week ago
Triggered auto assignment to @garrettmknight (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
:warning: It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time :warning:
Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature
)
I am Povilas Zirgulis from Callstack - expert contributor group. I’d like to work on this job
@puneetlath should the API for setCollection
be something like this?
Onyx.setCollection(ONYXKEYS.COLLECTION.REPORT, [
{ [`${ONYXKEYS.COLLECTION.REPORT}1`]: report1 },
{ [`${ONYXKEYS.COLLECTION.REPORT}2`]: report2 }
]);
I think the API for it should look basically exactly like mergeCollection
. Which I believe would mean it looks like this:
Onyx.setCollection(ONYXKEYS.COLLECTION.REPORT, {
[`${ONYXKEYS.COLLECTION.REPORT}${report1.reportID}`]: report1,
[`${ONYXKEYS.COLLECTION.REPORT}${report2.reportID}`]: report2,
[`${ONYXKEYS.COLLECTION.REPORT}${report3.reportID}`]: report3,
});
Unless there's some reason you think it should be different.
How's this going @zirgulis?
@puneetlath PR open https://github.com/Expensify/react-native-onyx/pull/594
Great!
We are going to be changing the behavior of OpenApp/ReconnectApp when it does a full reconnect to replace the full reports list that the client has stored instead of merging with it. In order to do that, we need to be able to send a list of report objects to the client and have Onyx.set be called for each of those reports. And have any reports that weren't included get cleared. In order to support this, let's add
SetCollection
to Onyx.