@@ -23,8 +23,8 @@ import CompleteButton from '../../ui/CompleteButton.jsx';
2323import { HelpIcon } from '../../ui/HelpIcon.jsx' ;
2424import { getTblById , doFetchTable , isTblDataAvail , MAX_ROW } from '../../tables/TableUtil.js' ;
2525import { dispatchMultiValueChange , dispatchRestoreDefaults } from '../../fieldGroup/FieldGroupCntlr.js' ;
26- import { logError } from '../../util/WebUtil.js' ;
27- import { getConverter , getMissionName , defaultDownloaderOptPanel , DL_DATA_TAG } from './LcConverterFactory.js' ;
26+ import { logError , updateSet } from '../../util/WebUtil.js' ;
27+ import { getConverter , getMissionName , DL_DATA_TAG } from './LcConverterFactory.js' ;
2828import { ERROR_MSG_KEY } from '../lightcurve/generic/errorMsg.js' ;
2929import { convertAngle } from '../../visualize/VisUtil.js' ;
3030
@@ -283,7 +283,7 @@ function setViewerFail() {
283283}
284284
285285function updateFullRawTable ( callback ) {
286- const layoutInfo = getLayouInfo ( ) ;
286+ var layoutInfo = getLayouInfo ( ) ;
287287 const tableItems = [ 'tableData' , 'tableMeta' ] ;
288288
289289 // fullRawTable for the derivation of other table, like phase folded table
@@ -302,7 +302,7 @@ function updateFullRawTable(callback) {
302302 var max = 365 ;
303303 var min = Math . pow ( 10 , - 3 ) ; // 0.001
304304
305- // var period = get( FieldGroupUtils.getGroupFields(LC.FG_PERIOD_FINDER), ['period', 'value'], '');
305+ // var period = get( FieldGroupUtils.getGroupFields(LC.FG_PERIOD_FINDER), ['period', 'value'], '');
306306
307307 const period = '' ;
308308 var fields = FieldGroupUtils . getGroupFields ( LC . FG_PERIOD_FINDER ) ;
@@ -325,17 +325,26 @@ function updateFullRawTable(callback) {
325325 dispatchRestoreDefaults ( LC . FG_PERIODOGRAM_FINDER ) ;
326326 }
327327
328+ //IRSA-464: the smartMerge does not replace array component. It updates the array. Therefore, setting it
329+ //null first to force the new fullRawTable is updated to the layout
330+ dispatchUpdateLayoutInfo ( Object . assign ( { } , layoutInfo , {
331+ fullRawTable :null ,
332+ periodRange : { min, max, tzero, tzeroMax, period}
333+ } ) ) ;
334+ //add the fullRawtable into the layout
328335 dispatchUpdateLayoutInfo ( Object . assign ( { } , layoutInfo , {
329336 fullRawTable,
330337 periodRange : { min, max, tzero, tzeroMax, period}
331338 } ) ) ;
339+
340+
332341 callback && callback ( ) ;
333342 } ;
334343
335- if ( layoutInfo . fullRawTable ) {
344+ var rawTable = getTblById ( LC . RAW_TABLE ) ;
345+ if ( layoutInfo . fullRawTable && layoutInfo . fullRawTable . totalRows === rawTable ) {
336346 callback && callback ( ) ;
337347 } else {
338- var rawTable = getTblById ( LC . RAW_TABLE ) ;
339348
340349 if ( isTblDataAvail ( 0 , rawTable . totalRows , rawTable ) ) {
341350 setTableData ( rawTable ) ;
0 commit comments