Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract defaultProps from a config file #13

Open
vincentaudebert opened this issue Jul 13, 2017 · 1 comment
Open

Extract defaultProps from a config file #13

vincentaudebert opened this issue Jul 13, 2017 · 1 comment

Comments

@vincentaudebert
Copy link
Contributor

vincentaudebert commented Jul 13, 2017

As discussed with @loicteixeira it would be easier and more future proof to extract duplicated defaultProps to a global config file:

display: 'title',
filters: [],
translations: {},
pk_name: 'uuid',
page_size: 10,
page_size_param: 'page_size',

filters: [],
page_size: 10,
page_size_param: 'page_size',
translations: {},

@loicteixeira
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants