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

Linkage between form controls #27

Closed
KeruKaikai opened this issue Nov 16, 2018 · 1 comment
Closed

Linkage between form controls #27

KeruKaikai opened this issue Nov 16, 2018 · 1 comment

Comments

@KeruKaikai
Copy link

demand:Two form controls,Linkage between form controls
Type: pull-down selection,
Product category: pull-down selection, (the initial state is hidden)
After selecting the type, a request is sent to the background. If the type has optional product classification, the product classification will be displayed

@xaboy
Copy link
Owner

xaboy commented Nov 16, 2018

Not built in, but can be implemented manually (Google translation)
type: typeRule
Product category: ProductCategoryRule

typeRule.event.change = ()=>{
    request('api').then((options)=>{
       if(options.length)
            ProductCategoryRule.options = options
        else
            ProductCategoryRule.props.hidden = true //OR $f.hidden(ProductCategoryRule.field)
    })
}

@xaboy xaboy closed this as completed Nov 19, 2018
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