I am trying to fetch a value from one input field (which is a reference field) to filter some values in another drop down based on first input field in a same form in ng-admin.
I tried to use permanent filters to filter value, it works if i give a hard coded value. but i am not able to figure out how to get value of filter dynamically from above input field .
any help will be appreciated. I am new to angular and ng-admin and finding hard to solve this .
below is the code.
nga.field('matchId', 'reference')
.label('Match')
.targetEntity(match)
.targetField(nga.field('description'))
.map(function(value) {
if (!value) return '';
return value.length > 20 ? value.substr(0, 20) + '...' : value;
}),
nga.field('slotId', 'reference')
.label('slot')
.targetEntity(match_slot)
.targetField(nga.field('matchSlotType')),
i want second field to be filtered based on input from first