text input field update based on another text input

I can't seem to get this working. I want to have one TextInput that's updated when another one is changed by the user. .
 TextInput::make('payment_before_discount')
                ->prefix('$')
                ->live(true)
                ->reactive()
                ->default($this->paymentData['total_before_discounts']),
           
            TextInput::make('payment_amount')
                ->label('Net Payment Amount')
                ->disabled()
                ->prefix('$')
                ->live()
                ->reactive()


When a user changes the payment_before_discount input, I want the value of the payment_amount input to update as well. I've tried using afterStateUpdated and also the default method, but can't seem to get it working.
Was this page helpful?