I have an select2 selectbox which collects data from php and turns them in to options for the select2 selectbox. The issue here is that it won't let me scroll down the list of options for some weird reason. We have a front-end developer who designed everything and inserted the select2 selectbox into the modal. When trying to scroll inside the selectbox.. This is what I get:
https://gyazo.com/21ad4aad44eb67c21419d93dba5fbe6b
I've tried using the docs to find a solution and even tried disabling scroll on whole body and html. None of this worked. Even with body not having scroll enabled, the option would still not let me scroll...
<div class="items">
<div class="label"><?php _e('Company', 'layback'); ?></div>
<div class="inputs">
<select class="select2 task--new-company">
<option value="0"><?php echo __('Please select...', 'layback'); ?></option>
<?php
$aCompanyARGS = array(
'post_type' => 'company',
'post_status'=> 'publish',
'posts_per_page'=> -1,
);
$aCompanyQuery = new WP_Query($aCompanyARGS);
$aCompanyPost = $aCompanyQuery->posts;
foreach($aCompanyPost as $iCompanyKey => $oCompany)
{
?>
<option value="<?php echo $oCompany->ID; ?>"><?php echo $oCompany->post_title; ?></option>
<?php
}
?>
</select>
</div>
</div>