Add multiple select boxes with the llms-posts-select2 class
Add data-post-type on the second one (ie. llms-group)
Expected Behavior
The second dropdown works as expected, fetching posts from the specified post type
Actual Behavior
It uses the post type from the first dropdown since options is shared and llmsSelect2 is initialized on all the dropdowns at the same time.
Testing
Testing a fix for this will just be making sure dropdowns like the bulk enroll "Select Course/Membership" on the Users page, filters on LifterLMS > Reporting, "Enrollments" tab, etc still work as expected.
Reproduction Steps
llms-posts-select2
classdata-post-type
on the second one (ie.llms-group
)Expected Behavior
The second dropdown works as expected, fetching posts from the specified post type
Actual Behavior
It uses the post type from the first dropdown since
options
is shared andllmsSelect2
is initialized on all the dropdowns at the same time.Testing
Testing a fix for this will just be making sure dropdowns like the bulk enroll "Select Course/Membership" on the Users page, filters on LifterLMS > Reporting, "Enrollments" tab, etc still work as expected.
This issue has be recreated:
Browser, Device, and Operating System Information