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

feat: add DropdownField component #52

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leonelv
Copy link

@leonelv leonelv commented Sep 10, 2024

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@leonelv
Copy link
Author

leonelv commented Sep 10, 2024

just a proof on concept for an use case that i need to cover, will complete the pr info soon

@leonelv leonelv marked this pull request as draft September 10, 2024 16:53
Comment on lines 200 to 201
defaultValue?: string
options?: IDropdownOption[]
Copy link
Author

Choose a reason for hiding this comment

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

casted from example on https://www.verygoodsecurity.com/docs/vgs-collect/js/integration

form.field('#space-for-my-field', {
  type: 'dropdown',
  name: 'car.manufacturer',
  placeholder:"Car manufacturer",
  options: [
      {value: 'volvo', text: 'Volvo'},
      {value: 'saab', text: 'Saab'},
      {value: 'opel', text: 'Opel'},
      {value: 'audi', text: 'Audi'}
  ],
  defaultValue: "volvo",
  validations: ['required']
});

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.

1 participant