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

added an optional "unique" flag to "getFieldID" that appends lodash "… #559

Merged
merged 2 commits into from
Dec 14, 2018

Conversation

zoul0813
Copy link
Member

…uniqueId" to the ID when true. Fixes #468

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Updates getFieldID and adds an optional unique flag for "list" components
  • What is the current behavior? (You can also link to an open issue here)
    List components (Radios, Checklist, etc) generate the same ID for all elements
  • What is the new behavior (if this is a feature change)?
    List components can now call getFieldID(schema, true) to append a lodash uniqueId() to the end of the generated ID, making them unique.
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    It should not, however, developers who have custom logic that accesses elements by their ID may have problems as the elements ID's are now unique.

@coveralls
Copy link

coveralls commented Dec 10, 2018

Coverage Status

Coverage increased (+0.06%) to 89.979% when pulling 3b012cd on zoul0813:feature/468-unique-ids into 4cc7a7a on vue-generators:master.

* master-origin:
  migrated VFG docs to newer GitBooks, created GitHub Repo for Docs to allow for easier maintenance, updated JSFiddle to use "latest" VFG, and created a CodePen version as well
  Codacy (guard-for-in) fix
  fixed code structure
  added "options" to VFG install function, appending custom "validators" to the validators object that are passed into `Vue.use(VueFormGenerator, { validators: { key: (value, field, model) => {} })
  fixed single-quotes
  added "type" attribute to inside buttons schema, defaults to "button" when one is not provided
  added "item.disabled" logic, supporting both boolean values and a function that is passed a reference to the model to determine disabled logic based on the model.
  listen for model-updated from `fields`, and fix `debounceFormatFunction` property to match fieldInput's `debounceFormatFunc` instead.

# Conflicts:
#	src/fields/core/fieldRadios.vue
@zoul0813 zoul0813 merged commit 846d49b into vue-generators:master Dec 14, 2018
@zoul0813 zoul0813 deleted the feature/468-unique-ids branch December 14, 2018 18:28
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.

Checklist, Radio Button W3C Complaince
2 participants