Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Additional data passed through form #49

Closed
kbrilla opened this issue Sep 18, 2020 · 3 comments
Closed

Additional data passed through form #49

kbrilla opened this issue Sep 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@kbrilla
Copy link

kbrilla commented Sep 18, 2020

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Expected behavior

I would like to propose ability to pass some custom observable data to form to be able to pass it through form control. It is really useful if that data is dependent on something in form model and we want to for example create that form in dedicated service.

  <kendo-multiselect
                #list
                [data]="control.data$ | async"
                [filterable]="true"
                textField="text"
                valueField="value"
                placeholder="T-shirt size"
               [formControl]=[control]
   >
    </kendo-multiselect>

and in service

 createControl(){
   const control = new FormControl<number>(undefined);
   control.passData(someObservableData$);
}

here it is a bit simplified and the use cases is not very visible but imagine this data being dependent on other form values from for example parent form. And some validations and disabled states also also depend on that data in other field etc.

I'm currently working on such form and such feature would be really useful and allow me to do everything much more neatly.

It become really usefull if data is used for a field in model that is in form array and is dependent on field from parent form group.

Just not sure if it should be observable or just "any" and let user decide what is needed.

@kbrilla kbrilla changed the title Additioanl data passed through form Additional data passed through form Sep 18, 2020
@NetanelBasal
Copy link
Member

I am not sure what is the use case and the functionality. Can you provide a complete example, please?

@kbrilla
Copy link
Author

kbrilla commented Sep 18, 2020

@NetanelBasal It will take some time but I already have use cases in my project so I will try to write something based on that.

@NetanelBasal NetanelBasal added the enhancement New feature or request label Sep 18, 2020
@itayod
Copy link
Contributor

itayod commented Nov 29, 2020

@criskrzysiu any progress with the usecase?

@ngneat ngneat locked and limited conversation to collaborators Jun 10, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants