Skip to content

Commit

Permalink
chore(weave): remove add row button from edit and confirm in add to d…
Browse files Browse the repository at this point in the history
…ataset (#3783)
  • Loading branch information
bcsherma authored Feb 26, 2025
1 parent 7a51fef commit 50c7cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const DatasetPreview: React.FC<DatasetPreviewProps> = ({
datasetObject={datasetObject}
isEditing={true}
hideRemoveForAddedRows={true}
showAddRowButton={false}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface EditableDatasetViewProps {
datasetObject: DatasetObjectVal;
isEditing?: boolean;
hideRemoveForAddedRows?: boolean;
showAddRowButton?: boolean;
}

interface OrderedRow {
Expand All @@ -70,6 +71,7 @@ export const EditableDatasetView: React.FC<EditableDatasetViewProps> = ({
datasetObject,
isEditing = false,
hideRemoveForAddedRows = false,
showAddRowButton = true,
}) => {
const {useTableRowsQuery, useTableQueryStats} = useWFHooks();
const [sortBy, setSortBy] = useState<SortBy[]>([]);
Expand Down Expand Up @@ -473,7 +475,7 @@ export const EditableDatasetView: React.FC<EditableDatasetViewProps> = ({
const CustomFooter = useCallback(() => {
return (
<GridFooterContainer>
{isEditing && (
{isEditing && showAddRowButton && (
<Box
sx={{
padding: '8px 16px',
Expand All @@ -499,7 +501,7 @@ export const EditableDatasetView: React.FC<EditableDatasetViewProps> = ({
</Box>
</GridFooterContainer>
);
}, [isEditing, handleAddRowsClick]);
}, [isEditing, handleAddRowsClick, showAddRowButton]);

return (
<div style={{display: 'flex', flexDirection: 'column', height: '100%'}}>
Expand Down

0 comments on commit 50c7cce

Please sign in to comment.