code: public function baseTransform()
      {
          parent::baseTransform();
          $disabled = (!$this->gridFieldRequest->getPreviousRecordID());
  
          return $this->setDisabled($disabled);
      }
docs: Updates the button to be disabled if there is no previous record
  @return FormAction