You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why and where does it come from? I didn't set this filter, so it should not be a result of the user request.
It can be disabled by suppressFilters as a workaround but this field is not even documented. IMO it should not be set by the user to filter unexpected results. The default behavior should remain as in ACF5.
The text was updated successfully, but these errors were encountered:
herrvigg
changed the title
getFields returns unrequested types in ACF6
JS acf.findFields returns unrequested types in ACF6
Nov 19, 2022
This was done in order to add support for the tabs in the new UI that was introduced in 6.0, and these fields should only show up if acf.findFields() is called while in the field group editor.
However, I can see how this definitely isn't ideal (especially when checking for a specific field type as in your example), and have raised this with the team so we can look into improving this in a future release.
The new Javascript API doesn't behave as expected with ACF6 (up to 6.0.5).
When editing a field group, this returns other elements with
data-type="tab"
like this:Expected result: only elements of
data-type="text"
, nottab
.Looking at the value of the internal
selector
in findFields there have been some changes but we can see there's still a regression:By debugging the JS scripts I found the
tabs
are added by thisfind_fields_selector
filter:acf/assets/build/js/acf-input.js
Lines 5712 to 5714 in 366796a
Why and where does it come from? I didn't set this filter, so it should not be a result of the user request.
It can be disabled by
suppressFilters
as a workaround but this field is not even documented. IMO it should not be set by the user to filter unexpected results. The default behavior should remain as in ACF5.The text was updated successfully, but these errors were encountered: