I'm experimenting with using CF's association field to hand-pick related posts on one of my blogs but I notice that the UI loads every object that matches the condition (e.g. post type is post). Since I've got 900 posts I now have 900 extra queries to populate the association field. From a quick scan of the codebase it looks non-trivial to implement pagination, but it would be cool to see in some future update. Thanks again for the excellent library/plugin/toolkit!
As a quick FYI, pagination for the Association field is already in our internal TODO and will probably be added in one of the next minor releases.
Having a site with 3000+ posts the association field is slowing down edit screens a lot. Any update on this?
Probably it would be better to have this implemented as an AJAX search?
So, is there a solution for the performance of the association field when there is a lot of posttype ?
Progress on this issue is being made here: https://github.com/htmlburger/carbon-fields/tree/feature/ajaxify-association-field
Next 2.X release will include a fix for the performance issues related with the association field.
Hi ! I've tested the branch ajaxify-association-field, and the ajax on the association field works greats.
But it looks like it didn't work on a complex fields. (When we have an association field in a complex field).
Do you know if there is a fix going on?
Thanks!
Hi @HugoLachance,
The feature is still in progress, we're aware of the complex field issue(and a few others). We hope to have them fixed next week.
Hi @HugoLachance,
I have updated the feature/ajaxify-association-field branch with a fix for the Association field for when used in a Complex field.
Can you give it a try and let me know if you experience any issues?
Thanks!
Did this get merged into 3.0? The branch 404's now and I haven't tested this in a while. I need to allow my users to select multiple posts (preferably via search/multiselect), so I want to search _all_ posts at once. If multiple of these types of fields are used on a page and there are a ton of posts/pages/cpt/terms it gets slow quickly. Ajax is the way to go, and not triggering till focus on the field or similar would be great, so it's not running any queries on page load.
I'm sure you already know/understand the reasons but this is a blocker for certain use-cases for me. Otherwise, great work yall!
Hi @JiveDig,
This is included into 3.0 release of Carbon Fields so you can test it. The AJAX requests get executed only when the user types something in the search field.
Great news, thanks 馃檶馃徏
Most helpful comment
Probably it would be better to have this implemented as an AJAX search?