Skip to content

[RFR] Improve <ReferenceInput> field#199

Merged
fzaninotto merged 12 commits intonextfrom
autocomplete_input
Dec 27, 2016
Merged

[RFR] Improve <ReferenceInput> field#199
fzaninotto merged 12 commits intonextfrom
autocomplete_input

Conversation

@fzaninotto
Copy link
Copy Markdown
Member

@fzaninotto fzaninotto commented Dec 23, 2016

  • Add <AutocompleteInput> field (Closes Autocomplete ReferenceInput #70)
  • Use it in the blog example
  • [BC Break] Add a limit to the fetching of <ReferenceInput> (set to 25 by default)
  • Add a perPage prop to <ReferenceInput> to allow fetching more or less options
  • Add a sort prop to <ReferenceInput> to allow sorting of options
  • Add doc
  • Add tests
  • [BC Break] Remove GET_MATCHING REST verb (and merge with GET_LIST)
  • optionText accepts a function in <SelectInput>, <RadioButtonGroupInput>, and <AutocompleteInput>
  • optionText accepts an element in <SelectInput>, and <RadioButtonGroupInput>
  • Fix bad setup of ReferenceInput value in filters
  • Set allowEmpty to true by default in Filter form (was breaking <ReferenceInput> in filters by default)

@fzaninotto fzaninotto changed the title Add <AutocompleteInput> field [WIP] Add <AutocompleteInput> field Dec 23, 2016
@fzaninotto fzaninotto changed the title [WIP] Add <AutocompleteInput> field [RFR] Add <AutocompleteInput> field Dec 26, 2016
@fzaninotto fzaninotto changed the title [RFR] Add <AutocompleteInput> field [WIP] Add <AutocompleteInput> field Dec 26, 2016
@fzaninotto fzaninotto changed the title [WIP] Add <AutocompleteInput> field [RFR] Add <AutocompleteInput> field Dec 26, 2016
@fzaninotto fzaninotto changed the title [RFR] Add <AutocompleteInput> field [RFR] Improve <ReferenceInput> field Dec 26, 2016
Copy link
Copy Markdown
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Comment thread package.json Outdated
@@ -55,7 +55,7 @@
"lodash.debounce": "~4.0.8",
"lodash.defaultsdeep": "^4.6.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ spotted

Comment thread src/mui/input/AutocompleteInput.js Outdated
* <AutocompleteInput source="author_id" options={{ fullWidth: true }} />
*/
class AutocompleteInput extends Component {
onNewRequest = (chosenRequest, index) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleNewRequest ? We use onXXX for props and handleXXX for handlers everywhere I think.

Comment thread src/mui/input/SelectInput.js Outdated
* The object passed as `options` props is passed to the material-ui <SelectField> component
*/
class SelectInput extends Component {
onChange = (event, index, value) => this.props.input.onChange(value);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleChange

@fzaninotto fzaninotto merged commit b46d23f into next Dec 27, 2016
@fzaninotto fzaninotto deleted the autocomplete_input branch December 27, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants