Home › Forums › ACF PRO › Select2 issue since 5.2.8 › Reply To: Select2 issue since 5.2.8
Hi Elliot,
Sure, here it is:
This goes in the acf-input.js, around line 6500 (I have added console logs hence the approx.):
// re-order options
$.each( selection, function( k, value ){
$.each( select2_args.data, function( i, choice ){
if ( typeof choice.children !== 'undefined' && choice.children.length ) {
$.each( choice.children, function( j, choice ) {
if ( value == choice.id )
initial_selection.push( choice );
});
}
else
{
if( value == choice.id ) {
initial_selection.push( choice );
}
}
});
});
Thanks so much!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.