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

Introduction new labelOptionProperty option for autocomplete field #59

Open
ddivin-sc opened this issue Mar 29, 2021 · 0 comments
Open
Milestone

Comments

@ddivin-sc
Copy link
Contributor

ddivin-sc commented Mar 29, 2021

Description

Now we maintenance the following options for reference autocomplete to
labelProperty - (REQUIRED) Value which is displayed in the field
valueProperty - (REQUIRED) Unique value for object identifying in select options.

But we introduce a new option to change the default behavior in the case when the user wants to see only the selected identifier
labelOptionProperty - (OPTIONAL) Value which is displayed in the options, by default used labelProperty.

NOTE: This option can be compatible with old behavior and doesn't change exists inputs

Pseudo code

<ReferenceAutocomplete
  autocompleteAction={() => {
    return new Promise((resolve) => { 
      resolve({"options": [{"id": "1", "_objectLabel": "A"}, {"id": "2", "_objectLabel": "B"}], "complete": false}); 
    }); 
  }}
  value={{"id": "1", "_objectLabel": "A"}}
  labelProperty="id"
  valueProperty="id"
  labelOptionProperty="_objectLabel"
/>

NOTES: before merge selectProperty renamed to labelOptionProperty

Original issue: https://opuscapita.atlassian.net/browse/EPROC-20368

@ocmachineuser ocmachineuser added this to the 3.0.14 milestone Apr 5, 2021
@ddivin-sc ddivin-sc changed the title Introduction new selectProperty option for autocomplete field Introduction new labelOptionProperty option for autocomplete field Apr 7, 2021
@ddivin-sc ddivin-sc removed this from the 3.0.14 milestone Apr 7, 2021
@ocmachineuser ocmachineuser added this to the 3.0.15 milestone Apr 7, 2021
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

No branches or pull requests

2 participants