Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:
- ABP Framework version: v7.4.5
- UI Type: Angular
- Database System: EF Core
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
{ type: ePropType.Enum, name: 'type', id: 'type', displayName: 'Blox::Entity:ModelDetail.Type', options: data => { return data.getInjected(ContentModelDetailService).getTypeSelectOptions$(); }, validators: () => [Validators.required] }, { type: ePropType.Enum, name: 'encryption', id: 'encryption', displayName: 'Blox::Entity:ModelDetail.EncryptionKeys', options: data => { return data.getInjected(ContentModelDetailService).getTypeEncryption$() ?? null; }, defaultValue: null as unknown as string, visible: data => { debugger; return true; } },
I have these 2 props, both select, i don't know how to get the value selected in my "type" prop, in debug i have record that is undefined (it's filled only in editForm and not dynamic) so how i get the value of my "type" prop dynamically so every time i change it i can hide or not my "encryption" select?
1 Answer(s)
-
0
I understand your case. in visible property you can't get the value of selection.
If you want to change the visibility of prop you can do something like this.
visible: data => { const formValue = data.getInjected(YourComponent).getFormValue(); return formValue.team === "GS"; },