wagtailmodelchoosers
wagtailmodelchoosers copied to clipboard
A Wagtail app to pick generic models (rather than snippets or pages)
The current screenshot shows some client work and should be replace with something more generic.
As discussed with @loicteixeira it would be easier and more future proof to extract duplicated `defaultProps` to a global config file: https://github.com/springload/wagtailmodelchoosers/blob/11ea65f914f4af83133f930b1d412e8920c65ddb/wagtailmodelchoosers/client/components/BaseChooser.js#L14-L19 https://github.com/springload/wagtailmodelchoosers/blob/fe0b76e8bb136cb8addcf41118016a56474d90d9/wagtailmodelchoosers/client/components/ModelPicker.js#L22-L25
When the `pk_name` isn't set up properly, the [input value](https://github.com/springload/wagtailmodelchoosers/blob/bb3bdee0c127ffbfb181a79d8f7333107a0a4721/wagtailmodelchoosers/client/components/ModelChooser.js#L32) will be set to `undefined` which will be received on the Python side as the `'undefined'` string. The JS should...
Shamefully steal fix from springload/wagtaildraftail/issues/41