Skip to content

Commit

Permalink
refactor(ValueOrderedArrayOfObjectsInput): OrderedArrayOfObjectsInput…
Browse files Browse the repository at this point in the history
…Props → ValueOrderedArrayOfObjectsInputProps
  • Loading branch information
mathiazom committed Sep 27, 2024
1 parent f04c2f9 commit aba125b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions studio/components/ValueOrderedArrayOfObjectsInput.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ArrayOfObjectsInputProps, ObjectItem } from "sanity";

interface OrderedArrayOfObjectsInputProps extends ArrayOfObjectsInputProps {
interface ValueOrderedArrayOfObjectsInputProps
extends ArrayOfObjectsInputProps {
valueCompareFn: (a: ObjectItem, b: ObjectItem) => number;
}

export default function ValueOrderedArrayOfObjectsInput({
valueCompareFn,
...defaultProps
}: OrderedArrayOfObjectsInputProps) {
}: ValueOrderedArrayOfObjectsInputProps) {
const orderedMembers = defaultProps.members.toSorted((a, b) => {
// place error items at the end
if (a.kind === "error") {
Expand Down

0 comments on commit aba125b

Please sign in to comment.