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
FWIW, the reason why we can't just set the props as optional with default in BaseChooser and mark the props as required in ModelPicker is because ModelPicker is used directly (not through BaseChooser) from DraftJS. Therefore we need to accommodate that some options might not be supplied.
As discussed with @loicteixeira it would be easier and more future proof to extract duplicated
defaultProps
to a global config file:wagtailmodelchoosers/wagtailmodelchoosers/client/components/BaseChooser.js
Lines 14 to 19 in 11ea65f
wagtailmodelchoosers/wagtailmodelchoosers/client/components/ModelPicker.js
Lines 22 to 25 in fe0b76e
The text was updated successfully, but these errors were encountered: