[Bugfix] Booking Date Picker - First few dates are rendered fast, but later dates are all rendered in UI at once. (#1989)

This commit is contained in:
hariombalhara authored and GitHub committed 2022-02-28 09:16:43 +00:00
1 parent 8717d96d0a
commit cc90cf0b72
2 files changed
+24 -7

No files matched your search

+3 -3
View File
@@ -181,7 +181,7 @@ function DatePicker({
// Update dates with their availability
doWorkAsync({
batch: 5,
batch: 1,
name: "DatePicker",
length: daysInMonth,
callback: (i: number, isLast) => {
@@ -201,8 +201,8 @@ function DatePicker({
date: day,
};
},
done: () => {
setDays(days);
batchDone: () => {
setDays([...days]);
},
});