Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Formly fields not updating the hideExpression attribute on a field when model changes #754

Open
kanalasumant opened this issue Oct 18, 2017 · 0 comments

Comments

@kanalasumant
Copy link

kanalasumant commented Oct 18, 2017

I'm sorry to have posted this in here since I tried to go here: help.angular-formly.com but there was no content there or removed.

I have a hide expression as so:

    key: "rotation_speed",
    type: "select",
    noFormControl: true,
    templateOptions: {
      label: 'Animation Speed',
      required: true,
      placeholder: 'Animation Speed',
      valueProp: "value",
      labelProp: "name",
      options: [
        {
          'name' : 'Fast Clockwise',
          'value' : '-10'
        },
        {
          'name' : 'Medium Clockwise',
          'value' : '-5'
        }
      ]
    },
    hideExpression: 'model.img_type === "regular"',
  }

and the formly fields in frontend as this:

<formly-form model="panoFactory.presentation.scenes[$index]" fields="scene_fields"></formly-form>

I verified that the model changes in the frontend but the hideExpression isn't getting updated probably due to some scoping issues. Any help on this would be much appreciated. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant