wagtail / wagtail-generic-chooser

A toolkit for custom chooser popups in Wagtail
BSD 3-Clause "New" or "Revised" License
116 stars 25 forks source link

label_format does not see Generic Chooser #70

Open rgs258 opened 1 year ago

rgs258 commented 1 year ago

It looks like that when a ChooserBlock (or subclass) is within a StructBlock, the selected object's label is not able to contribute to getTextLabel (I think?) and so the next block is looked to for the StructBlock's label. When a ChooserBlock is specified explicitly in label_format, then null is given as the name in the editor. Seems like somehow getTextLabel just needs to see the result of get_title on the AdminChooser. ...I'd try to get you a PR, but I just don't have the time to go any deeper. Very much appreciate all the work you put into this!