Hot answers tagged

3

It looks like a proper fix for this has been added to the latest version of core, 8.8+, see #2863188 Hardcoded result size limit in the entity reference autocomplete widget.


1

You need to declare on what object (or class if static) to call the callback, like 'callback' => [get_called_class(), 'settingsAjax'] or '#ajax' => [ 'callback' => [get_class($this), 'addMoreAjax'], 'wrapper' => $wrapper_id, 'effect' => 'fade', ], or at least 'callback' => '::settingsAjax' ...


1

You must use the ViewExecutable::buildRenderable function. Instead of: $content = $this->renderer->render($view->render()); You must do like this: $content = $view->buildRenderable('block', $args);


1

Just added a video link to show you : imgur.com/EmVha6e You just need to add a conditional to check if it's not ajax $request = \Drupal::request(); $is_ajax = $request->isXmlHttpRequest(); if (!is_ajax) { // code that sets the filter initial value } Credit: How can I detect AJAX request inside Drupal?


Only top voted, non community-wiki answers of a minimum length are eligible