修复 crud keepItemSelectionOnPageChange 无效的问题

This commit is contained in:
2betop 2020-12-02 12:14:27 +08:00
parent 30c95f8748
commit d7de45cd29

View File

@ -1322,7 +1322,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
// newUnSelectedItems.push(...unSelectedItems);
}
if (pickerMode && !multiple && newItems.length > 1) {
if (pickerMode && multiple !== false && newItems.length > 1) {
newUnSelectedItems.push(...newItems.splice(0, newItems.length - 1));
}
@ -1969,7 +1969,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
)
: null}
{keepItemSelectionOnPageChange && multiple
{keepItemSelectionOnPageChange && multiple !== false
? this.renderSelection()
: null}