2

I’m using JsonForms for my form creation in React. I’m working on creating a test r and was wondering why it needs a rank?

import { rankWith, scopeEndsWith } from '@jsonforms/core';

export default rankWith(
  3, // what’s the use for this?
  scopeEndsWith('rating')
);
Dev
  • 21
  • 2

1 Answers1

0

The rank is how high it should be in terms of the rendering list.

If you had one component with a tester with a rank of 1

export default rankWith(
  1,
  scopeEndsWith('rating')
);

and another tester with a rank of 2

export default rankWith(
  2,
  scopeEndsWith('rating')
)

then the component with a tester that has rank 1 will be used instead of the one with rank 2