Skip to content
Discussion options

You must be logged in to vote

Ok I think I understand the question you have now. No I don't think you're missing a prop, but I'm not sure how we could pass the object to SelectValue if it's not in items. We wouldn't know about it. So I think you should account for it in your SelectValue component. Does something like this work for you?

        <SelectValue>
          {({ defaultChildren, isPlaceholder }) => {
            if (isPlaceholder && selectedValue) {
              return // whatever that item would render to, maybe (ignore) => renderSelected(outside of items copy of object)
           }
            return isPlaceholder
              ? placeholder
              : renderSelected
                ? renderSelected
…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@realwitt
Comment options

@snowystinger
Comment options

Answer selected by realwitt
@realwitt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants