Skip to content

Commit 17c8597

Browse files
committed
fix types
1 parent 0b5ce65 commit 17c8597

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

app/src/components/dataset/NewDatasetLabelDialog.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ import {
1212
} from "@phoenix/components/dataset/useDatasetLabelMutations";
1313
import { NewLabelForm } from "@phoenix/components/label";
1414

15-
type NewDatasetLabelDialogProps = UseDatasetLabelMutationsParams;
15+
type NewDatasetLabelDialogProps = UseDatasetLabelMutationsParams & {
16+
onCompleted: () => void;
17+
};
1618

1719
export function NewDatasetLabelDialog(props: NewDatasetLabelDialogProps) {
18-
const { updateConnectionIds, datasetId } = props;
20+
const { updateConnectionIds, datasetId, onCompleted } = props;
1921
const { addLabelMutation, isSubmitting, error } = useDatasetLabelMutations({
2022
updateConnectionIds,
2123
datasetId,
@@ -36,7 +38,10 @@ export function NewDatasetLabelDialog(props: NewDatasetLabelDialogProps) {
3638
) : null}
3739
<NewLabelForm
3840
onSubmit={(label) => {
39-
addLabelMutation(label, () => close());
41+
addLabelMutation(label, () => {
42+
onCompleted();
43+
close();
44+
});
4045
}}
4146
isSubmitting={isSubmitting}
4247
/>

0 commit comments

Comments
 (0)