Skip to content

Commit

Permalink
4. For TABLE entity, while adding data, do not show the next entity n…
Browse files Browse the repository at this point in the history
…ame in the lower panel.
  • Loading branch information
ramirobg94 committed Oct 21, 2024
1 parent 8281d5f commit 7558889
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {View, StyleSheet} from 'react-native';
import {isTablet} from 'react-native-device-info';
import {useDispatch, useSelector} from 'react-redux';

import {useIsTable} from 'screens/Form/components/EntityPage/components/common/EntityPanel/NewItemButton/component';
import {defaultCycle} from 'arena/config';
import Button from 'arena-mobile-ui/components/Button';
import Icon from 'arena-mobile-ui/components/Icon';
Expand Down Expand Up @@ -386,11 +387,19 @@ const Next = ({parent}) => {
formSelectors.getParentEntityNodeDef,
);
const isEntityShowAsTable = useSelector(formSelectors.isEntityShowAsTable);

const isTable = useIsTable();
const isMultiple = useMemo(
() => NodeDefs.isMultiple(currentEntityNodeDef),
[currentEntityNodeDef],
);
const showMultipleEntityHome = useSelector(
formSelectors.showMultipleEntityHome,
);

if ((isTable || isMultiple) && !showMultipleEntityHome) {
return <View />;
}

if (nextNodeDef?.uuid) {
return <NavigationButton nodeDef={nextNodeDef} />;
}
Expand Down

0 comments on commit 7558889

Please sign in to comment.