File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,15 @@ export function calcCheckStateConduct(treeNodes, checkedKeys) {
350
350
} ;
351
351
}
352
352
353
+ /**
354
+ * Since React internal will convert key to string,
355
+ * we need do this to avoid `checkStrictly` use number match
356
+ */
357
+ function keyListToString ( keyList ) {
358
+ if ( ! keyList ) return keyList ;
359
+ return keyList . map ( key => String ( key ) ) ;
360
+ }
361
+
353
362
/**
354
363
* Calculate the value of checked and halfChecked keys.
355
364
* This should be only run in init or props changed.
@@ -379,6 +388,9 @@ export function calcCheckedKeys(keys, props) {
379
388
return null ;
380
389
}
381
390
391
+ keyProps . checkedKeys = keyListToString ( keyProps . checkedKeys ) ;
392
+ keyProps . halfCheckedKeys = keyListToString ( keyProps . halfCheckedKeys ) ;
393
+
382
394
// Do nothing if is checkStrictly mode
383
395
if ( checkStrictly ) {
384
396
return keyProps ;
You can’t perform that action at this time.
0 commit comments