Merge pull request #1131 from 2betop/crud-bugfix

修复 crud keepItemSelectionOnPageChange 无效的问题
This commit is contained in:
吴多益 2020-12-02 12:46:43 +08:00 committed by GitHub
commit 0c76127f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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}