Skip to content

Conversation

DoctorRainer
Copy link

No description provided.

Copy link

@hexadecy hexadecy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't add the prop to the interface and you have to put the initPosition first.
We can also leave the 0 at the end just in case.

initPosition?: number;

const [selectedItem, setSelectedItem] = useState(props.initPosition || props.selectedItem || 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants