fix: List Item de-selection and empty state on deploy mode (#6871)

* revert deselection

* fix empty list state page mode

Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
This commit is contained in:
Pawan Kumar 2021-08-25 15:56:45 +05:30 committed by GitHub
parent 2f473fbd66
commit 596edce2e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ import {
isBoolean,
omit,
floor,
isEmpty,
} from "lodash";
import * as Sentry from "@sentry/react";
@ -241,8 +242,6 @@ class ListWidget extends BaseWidget<ListWidgetProps<WidgetProps>, WidgetState> {
type: EventType.ON_ROW_SELECTED,
},
});
} else {
this.props.updateWidgetMetaProperty("selectedItemIndex", undefined);
}
if (!action) return;
@ -751,7 +750,7 @@ class ListWidget extends BaseWidget<ListWidgetProps<WidgetProps>, WidgetState> {
if (
Array.isArray(this.props.listData) &&
this.props.listData.length === 0 &&
this.props.listData.filter((item) => !isEmpty(item)).length === 0 &&
this.props.renderMode === RenderModes.PAGE
) {
return <ListComponentEmpty>No data to display</ListComponentEmpty>;