We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4b1bf1 commit cf78343Copy full SHA for cf78343
src/Overflow.tsx
@@ -177,6 +177,13 @@ function Overflow<ItemType = any>(
177
);
178
179
function updateDisplayCount(count: number, notReady?: boolean) {
180
+ // React 18 will sync render even when the value is same in some case.
181
+ // We take `mergedData` as deps which may cause dead loop if it's dynamic generate.
182
+ // ref: https://github.com/ant-design/ant-design/issues/36559
183
+ if (displayCount === count) {
184
+ return;
185
+ }
186
+
187
setDisplayCount(count);
188
if (!notReady) {
189
setRestReady(count < data.length - 1);
0 commit comments