File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/src/components/dataset Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ import {
1212} from "@phoenix/components/dataset/useDatasetLabelMutations" ;
1313import { NewLabelForm } from "@phoenix/components/label" ;
1414
15- type NewDatasetLabelDialogProps = UseDatasetLabelMutationsParams ;
15+ type NewDatasetLabelDialogProps = UseDatasetLabelMutationsParams & {
16+ onCompleted : ( ) => void ;
17+ } ;
1618
1719export 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 />
You can’t perform that action at this time.
0 commit comments