Skip to content

Commit 4f7e2f8

Browse files
authored
Merge pull request #88071 from software-mansion-labs/jnowakow/enable-undelete-action-when-offline
Enable undelete action when offline
2 parents e5b51db + 4c1e419 commit 4f7e2f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/components/Search/SearchList/ListItem/ActionCell

src/components/Search/SearchList/ListItem/ActionCell/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function ActionCell({
8080

8181
const text = translate(actionTranslationsMap[action]);
8282

83+
const shouldBeDisabledOffline = action !== CONST.SEARCH.ACTION_TYPES.UNDELETE && isOffline;
8384
const buttonInnerStyles = isSelected && action === CONST.SEARCH.ACTION_TYPES.UNDELETE ? styles.buttonDefaultSelected : {};
8485

8586
return (
@@ -91,7 +92,7 @@ function ActionCell({
9192
style={[styles.w100, shouldDisablePointerEvents && styles.pointerEventsNone]}
9293
isLoading={isLoading}
9394
success={action !== CONST.SEARCH.ACTION_TYPES.UNDELETE}
94-
isDisabled={isOffline || shouldDisablePointerEvents}
95+
isDisabled={shouldBeDisabledOffline || shouldDisablePointerEvents}
9596
shouldStayNormalOnDisable={shouldDisablePointerEvents}
9697
innerStyles={buttonInnerStyles}
9798
isNested

0 commit comments

Comments
 (0)