- This topic has 1 reply, 2 voices, and was last updated 8 months, 2 weeks ago by .
select_advancedfields can we please have a way to set the ajax delay option for select2 via
js_optionsfor the field or a filter?
I’ve tried adding it to
js_optionsbut it’s not working.
array( 'name' => 'Author', 'id' => 'post_author', 'type' => 'user', 'field_type' => 'select_advanced', 'placeholder' => 'Select an Author', 'query_args' => array( 'role' => 'my_custom_role', 'number' => 10, ), 'js_options' => array( 'minimumInputLength' => 3, // Require this many characters before triggering the ajax request. 'ajax' => array( 'delay' => 10000, // Wait this many milliseconds before triggering the ajax request. ), ), ),
- You must be logged in to reply to this topic.