Disabled Button

I have a function that hides a button on my view if a particular date is selected. I also have an updated livewire hook that listens for a change in an input viewed which checks runs the function in other to disable the button or not. However, once the button is hidden, even when its supposed to unhide the button it remains hidden.

public $isDisabled = true;
public $payroll_date;
public function disableButton()


    $date = Carbon::parse($this->payroll_date);

    $this->paysliprecords = PaymentHistory::where('staff_id', '=', $this->staff_id)

        ->whereMonth('payroll_date', $date)->first();

    if ($this->paysliprecords) {

        if ($date->isSameMonth($this->paysliprecords->payroll_date)) {

            $this->isDisabled = false;

        } else {

            $this->isDisabled = true;





public function updatedPayrollDate($value)


    $this->emit('payrollMonth', $value, $this->staff_id);



@if ($isDisabled)

                    <b><a name="" id="" class="btn btn-primary pay_btn" href="#" role="button"

                            wire:click="generateslip('{{ $staff->staff_id }}')">

                            Generate Slip</a></b>


However, after the first