We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0632025 commit f502634Copy full SHA for f502634
packages/examples/src/examples/rule.ts
@@ -22,6 +22,7 @@
22
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
THE SOFTWARE.
24
*/
25
+import { ValidateFunctionContext } from '@jsonforms/core';
26
import { registerExamples } from '../register';
27
28
export const schema = {
@@ -113,8 +114,11 @@ export const uischema = {
113
114
effect: 'SHOW',
115
condition: {
116
scope: '#',
- validate: (data: any) => {
117
- return !data.dead && data.kindOfVegetables !== 'All';
+ validate: (context: ValidateFunctionContext) => {
118
+ return (
119
+ !(context.data as any).dead &&
120
+ (context.data as any).kindOfVegetables !== 'All'
121
+ );
122
},
123
124
0 commit comments