Created
June 7, 2019 15:00
-
-
Save Lily418/fd31ab30e3903b7c72f64f53307426b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| rankWith, | |
| scopeEndsWith | |
| } from '@jsonforms/core'; | |
| export default rankWith( | |
| Number.MAX_VALUE, | |
| (x) => { | |
| if(!x.elements) { | |
| return false | |
| } | |
| const lastElement = x.elements[x.elements.length - 1] | |
| return lastElement.scope && lastElement.scope.endsWith("unit") | |
| } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment