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

Events on Selection? #143

Open
stemarf50 opened this issue Apr 2, 2019 · 1 comment
Open

Events on Selection? #143

stemarf50 opened this issue Apr 2, 2019 · 1 comment
Labels
question Further information is requested

Comments

@stemarf50
Copy link

I've noticed that the built-in ChainedSelect lets us open more selectors based on dropdown selections. How can I open up a custom component (or any other component except another selector) based on the option I've selected? I would like to open/unhide another component the moment the selection is made, just like how ChainedSelect works.

On a similar note, I wanted to know how I can use a Boolean field this way too, which triggers actions such as hide/unhide/set when I check or uncheck the boolean.

@atulmith
Copy link

atulmith commented May 8, 2019

Hi I too would like to know how to listen to select event in the "SelectField" component.
I would like to call the server with the selected value.
`{
name: "selectField",
component: "SelectField",
label: "SelectField",
help: "Example help",
required: true,
blankString: "None",
options: [
{ value: "red", label: "Red" },
{ value: "green", label: "Green" },
{ value: "blue", label: "Blue" }
],
listeners: [
{
event: "selectField",
actions: [
{
component: "MyAction",

          message: "Thanks for the Change Selecting message"
        },
        {
          component: "Set",
          name: "fields.phone.value",
          value: "onchange"
        }
      ]
    }
  ]
}`

@redgeoff redgeoff added the question Further information is requested label Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants