mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-28 23:50:04 -05:00
When a schema field uses a dynamic type function (type as a function) and is rendered inside a collection (e.g. chain tasks), the function always received the top-level schema data instead of the row-level data. This caused the field to fall through to its default type, ignoring the actual field values in the row. Resolve the type callback's state against the field's own container instead, mirroring what cell() already gets via its row argument: for a field inside a collection row that is the row, and for a top-level field the parent path is empty, so the whole schema data comes back as before. Nested tabs and fieldsets carry no id, so they do not extend the access path and are unaffected. As well as the pg_timetable case that prompted this, it repairs the expanded-row Definition forms that were already relying on row state and silently getting the table's: the foreign key 'Referencing' column list, the partition name control's attach/create switch, and the column dialog's identity/generated constraint options.