Update a KeyValue field

in V2 I was able to update a KeyValue field like so:

Forms\Components\TextInput::make('test1')
  ->live()
  ->afterStateUpdated(function (Forms\Get $get, Forms\Set $set) {
      $set('test2', [
          'txt' => $get('test1'),
      ]);
  }),

                                Forms\Components\KeyValue::make('test2')
  ->default(['txt' => '']),


But that doesn't seem to work anymore... I can't figure out how to update the values :/
Was this page helpful?