Overwrite a state's value

Hey All,
I'm facing a weird issue, 1 month ago, I was able to use the following setup to update my state,
my state's structure:

and I'm updating rowIsSelected by event handler using this approach:

and the same for operations here :

now I'm able to update rowIsSelected only, but updating operations values doesn't work, the code didn't change, and I'm not sure how to fix this issue

I do not know what your issue is, but maybe you might be interested with the state.setIn() function. This could for example be used like this in your case:

campaignListState.setIn("operations", {
  startButtonIsEnabled: true, 
  pauseButtonIsEnabled true, 
  /* ... */ 

setIn() doesn't work neither
seems like the issue in using nested state values
anyways, I've changed the structure of the state to be only one level of values, and I created a separated state, it works fine now

Hi there! I'm glad you have a solution :blush:

For future reference, you can use an array within setIn() to identify a specific property that you want to update.

For example, this JS query sets the stopButtonText from "" to 'hello'

Similarly, we can set one of the selectedColumns like this: