Does itemData update after submitting input to dataset?

Hi Velo-Ninja,

As I mentioned, the repeater is doing fine reloading with the new data just by using the .save() operation. So I didn’t see a reason to add the .refresh() there.

The problem occurs in the second part, with the popup window where I manually load the item’s “subject” and “comment” using code and have it show in text elements. Since the itemData isn’t updating, the text elements show the old information.

To illustrate this further, I added a refresh and then console log to the first part of the code:

$item ( '#updateButton' ). onClick (() => { 
            	$item ( '#commentReadWrite' ). setFieldValue ( 'edited' , 'Edited' );  
            	$item ( '#commentReadWrite' ). save (). then (() =>  			{ $w ( '#commentReadWrite' ). refresh (). then ( () => { 
	console . log ( itemData . comment ); })}) 
            	editOff (); 
            	$item ( '#updateDate' ). show ()    
           	 }) 

…and the console log is still showing the old comment.

I think I’ve encountered this before, where it seems like the itemData stays fixed even though repeaters are updating and when I go to the content manager, the collection is updated as well. It made me wonder if the itemData only gets updated when a new session starts. I’m still learning so please clarify if I’m missing something.