Files
payloadcms/packages
German Jablonski ffed5407cd fix(ui): listSearchableFields can resolve to multiple fields with the same name when using tabs (#13668)
Fixes #13665

This PR fixes the issue by searching only for the first field with the
given name.

I used a Set to iterate over the array of fields only once.

The question remains: What happens if someone wants to search for a
nested field that has the same name as a top-level field?

I think this is a much less likely scenario than the one that happened
to OP in #13665, and in that case the user would probably want to change
the name of the nested field.

If we see this as a problem in the future, we can consider something
like using paths (`tabName.fieldName`).

For review, the example snippet that appears in the issue can be used.
2025-09-10 16:11:22 +00:00
..
2025-09-09 11:59:18 -04:00
2025-09-09 11:59:18 -04:00
2025-09-09 11:59:18 -04:00