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(dynamic-forms): allow elements to be disabled via configuration #1219

Merged
merged 10 commits into from
Aug 15, 2018

Conversation

emoralesb05
Copy link
Contributor

@emoralesb05 emoralesb05 commented Aug 14, 2018

Description

adding a disabled property to disable properties on the fly without the
need of accessing the underlying form

What's included?

  • new disabled property in the configuration
  • updated Demo and README

Test Steps

General Tests for Every PR

  • npm run serve:prod still works.
  • npm run tslint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build:lib still works.
  • npm run build:lib still works.
Screenshots or link to StackBlitz/Plunker

closes #1126

emoralesb05 and others added 6 commits August 13, 2018 11:55
this is needed because we were mixing reactive forms with template driven forms
and this usage will be deprecated in angular 7

also used the covalent control value accessor mixin
since we are injecting the control instance into the underlying element
form support was never needed
adding a disabled property to disable properties on the fly without the
need of accessing the underlying form
@emoralesb05 emoralesb05 added this to the Release 2.0.0 milestone Aug 14, 2018
Copy link
Collaborator

@JulieMarie JulieMarie left a comment

Choose a reason for hiding this comment

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

I don't like the how the disabled slider looks/works. It's not grayed out, but the dot grays out when you click on it. Title should be grayed out too.

Don't like the slider toggle. Title should be grayed out and larger font to match the others.

File upload button is still active even though element is disabled.
disabled-elements

@emoralesb05
Copy link
Contributor Author

This is for the file-input issue: #1220 [Bug]: file-input doesnt handle disabled state via reactive forms.

the slide-toggle is a material issue and thats how it works.

@JulieMarie JulieMarie dismissed their stale review August 14, 2018 20:53

Not going to be fixed.

@emoralesb05
Copy link
Contributor Author

emoralesb05 commented Aug 14, 2018

  • Fixed the label SCSS for the slider.. turns out with the latest material update it broke. Your comment made me release that @JulieMarie

@emoralesb05 emoralesb05 merged commit 2e2b8a0 into develop Aug 15, 2018
@emoralesb05 emoralesb05 deleted the feature/disable-dynamic-forms branch August 15, 2018 20:37
kriswinbush pushed a commit to kriswinbush/covalent that referenced this pull request Feb 20, 2020
…eradata#1219)

* refactor(dynamic-forms): remove ngModel usage

this is needed because we were mixing reactive forms with template driven forms
and this usage will be deprecated in angular 7

also used the covalent control value accessor mixin

* chore(): remove AbstractControlValueAccessor code since its not needed

* fix(): form support was not needed in the dynamic elements

since we are injecting the control instance into the underlying element
form support was never needed

* feat(dynamic-forms): allow elements to be disabled via configuration

adding a disabled property to disable properties on the fly without the
need of accessing the underlying form

* fix(): disable input in dynamic file input

* fix(): fix label scss for slider
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.

Add disabled option to dynamic-form select-component
3 participants