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

Handle file-input disabled state via reactive forms #1267

Closed
wants to merge 3 commits into from
Closed

Handle file-input disabled state via reactive forms #1267

wants to merge 3 commits into from

Conversation

n370
Copy link

@n370 n370 commented Oct 26, 2018

Description

Changes added here modify the <td-file-input> component being used inside the <td-dynamic-file-input> component to use a [disabled] custom input property with the appropriate value to make it look and behave as the rest of the elements inside the dynamic component when it's in a disabled state.

What's included?

Test Steps

  • Run npm run serve
  • Navigate to http://localhost:4200/#/components/dynamic-forms
  • Add a new file-input element to the "Generated Form" panel using the "Form Builder" panel.
  • Toggle the "disable" switch to set the disable property on and off in the component and then hit the "Update Form" button to see the changes reflected on the dynamically generated component.

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.
Screenshots or link to StackBlitz/Plunker

screen shot 2018-10-26 at 19 40 11

@jeremysmartt jeremysmartt added this to the Release 2.0.0 milestone Oct 29, 2018
@emoralesb05
Copy link
Contributor

This wont fix this.. you cant use template driver forms combined with reactive forms anymore

image

hence why the #1220 issue states to make it work with reactive forms.. which requires code changes in the components such as injecting ngModel optionally and such.

Copy link
Contributor

@emoralesb05 emoralesb05 left a comment

Choose a reason for hiding this comment

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

Needs a different approach

@n370
Copy link
Author

n370 commented Nov 14, 2018

@felipeik I'm interested in keep working on this by my own as an independent open source contributor if you don't mind.

@emoralesb05 thanks for the feedback, I'll keep working on that. Expect me to be working on this over the next couple of days.

@jeremysmartt
Copy link
Collaborator

closing for now

@n370 n370 deleted the hotfix-#1220 branch December 3, 2018 11:48
@n370
Copy link
Author

n370 commented Dec 3, 2018

I've been very busy lately I don't think I'd be able to meet what I promised, sorry about that.

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.

3 participants