File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/components/projects/projectId/attributes/attributeId/LLM Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,12 @@ export default function LLMPlaygroundModal() {
122122 return attributes . filter ( a => DISPLAY_STATES . includes ( a . state ) ) . map ( a => ( { name : a . name , dataType : a . dataType } ) ) ;
123123 } , [ attributes ] )
124124
125- return ( < Modal modalName = { ModalEnum . LLM_PLAYGROUND } acceptButton = { acceptButton } className = "ml-10 md:max-w-[calc(100vw-15rem)]" >
125+ const finalAcceptButton = useMemo ( ( ) => {
126+ if ( playgroundTestRunning ) return { ...acceptButton , disabled : true } ;
127+ return acceptButton ;
128+ } , [ acceptButton , playgroundTestRunning ] )
129+
130+ return ( < Modal modalName = { ModalEnum . LLM_PLAYGROUND } acceptButton = { finalAcceptButton } className = "ml-10 md:max-w-[calc(100vw-15rem)]" >
126131 < div className = "pl-2 pr-5 max-h-[calc(100vh-15rem)] overflow-y-auto" >
127132 < div className = "flex flex-row items-center justify-center" >
128133 < span className = "text-lg flex flex-row gap-x-2 text-gray-900 font-medium items-center" >
You can’t perform that action at this time.
0 commit comments