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

staticData Prop now expects Array #598

Closed
wants to merge 1 commit into from
Closed

staticData Prop now expects Array #598

wants to merge 1 commit into from

Conversation

BenoitRanque
Copy link
Contributor

@BenoitRanque BenoitRanque commented May 28, 2017

staticData Prop now expects list array, following format

staticData = [
    {
      value: 'Romania', // what gets Autocompleted with
      label: 'Romania', // what gets displayed as main label for this suggestion
      secondLabel: 'Continent: Europe', // optional
      icon: 'location_city', // optional
      stamp: '18 mil', // optional
      ...
    },
    ...
  ]

This removes the option for custom field name altogether.

Untested... Apologies

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the dev branch and not the master branch
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • It's been tested with all Quasar themes
  • It's been tested on a Cordova (iOS, Android) app
  • It's been tested on a Electron app
  • Any necessary documentation has been added or updated in the docs (for faster update click on "Suggest an edit on GitHub" at bottom of page) or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

`staticData` Prop now expects list array, following format 

```
staticData = [
    {
      value: 'Romania', // what gets Autocompleted with
      label: 'Romania', // what gets displayed as main label for this suggestion
      secondLabel: 'Continent: Europe', // optional
      icon: 'location_city', // optional
      stamp: '18 mil', // optional
      ...
    },
    ...
  ]
```
This removes the option for custom field name altogether. 

Untested... Apologies
@rstoenescu
Copy link
Member

Hi,

First, thank you for contributing!

The reason for the current staticData structure is to allow developer to search in a specific prop of the data, which is to enrich the experience. You are now able to display a label (label prop), autocomplete with a value (value prop), and search on another prop (current "field") to return suggestions.

Why removing the current "field"?

@BenoitRanque
Copy link
Contributor Author

Just wanted to propose the opposite of what I submited earlier. So you can choose either

@rstoenescu
Copy link
Member

Ah, I see. Already merged first one. Thanks a lot for your contributions, Benoit!

@rstoenescu
Copy link
Member

Ok, this means we can close this since I merged the other version, right?

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.

2 participants