public function PrivateMessageForm::ajaxCallback in Opigno messaging 3.x
File
- src/
Form/ PrivateMessageForm.php, line 30
Class
- PrivateMessageForm
- Override the default PrivateMessageForm.
Namespace
Drupal\opigno_messaging\FormCode
public function ajaxCallback(array $form, FormStateInterface $formState) {
$response = parent::ajaxCallback($form, $formState);
// On submit scroll to the last message.
$response
->addCommand(new OpignoScrollToLastMessage());
return $response;
}