File tree Expand file tree Collapse file tree
src/components/map-projects Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ const MapProject = () => {
236236 const bridgeCandidatesRef = React . useRef ( [ ] ) ;
237237 const scispacyCandidatesRef = React . useRef ( [ ] ) ;
238238 const rowStageRef = React . useRef ( [ ] ) ;
239+ const algoRef = React . useRef ( [ ] ) ;
239240
240241 /*eslint no-undef: 0*/
241242 const AI_ASSISTANT_API_URL = window . AI_ASSISTANT_API_URL || process . env . AI_ASSISTANT_API_URL
@@ -921,7 +922,7 @@ const MapProject = () => {
921922 const isLLMAlgoAllowed = version ?. match_algorithms ?. includes ( 'llm' )
922923 newAlgos [ 1 ] . disabled = ! isLLMAlgoAllowed
923924 setAlgos ( newAlgos )
924- if ( ! isLLMAlgoAllowed && algo === 'llm' ) {
925+ if ( ! isLLMAlgoAllowed && algoRef . current === 'llm' ) {
925926 onAlgoSelect ( 'es' )
926927 }
927928 }
@@ -1194,6 +1195,9 @@ const MapProject = () => {
11941195 React . useEffect ( ( ) => {
11951196 rowStageRef . current = rowStage ;
11961197 } , [ rowStage ] ) ;
1198+ React . useEffect ( ( ) => {
1199+ algoRef . current = algo ;
1200+ } , [ algo ] ) ;
11971201
11981202 const runBulkAIAnalysis = async ( _rows ) => {
11991203 setLoadingMatches ( true )
You can’t perform that action at this time.
0 commit comments