Skip to content

value should be defaulted to message (I can send you a PR if you want) #201

Closed

Description

@anback

Hi Lucas!

Really nice lib! I use it as my go to lib for creating chat bots

Here is an idea for an improvement. See pic below. the value field is as we all know implicitly undefined if we dont set it. This leads to unintuitive behaivour because the example in the pic looks kind of looks ok from a newbie standpoint. The Steps object has the info it needs in order to trigger different paths in the chat flow (in the pic i want to trigger S3 or S9 if i klick yes of no in the chat bot). However this did not work in practise, after debugging and banging my head into the wall for about 15 minute i tried setting the value prop to different values and then BAAM it worked. I can understand why you coded it this way (probably you fish up the right step to render based on value prop). This however make onboarding hard for newbie users and its kind of unintuitive. I propose we default the value prop do the message prop if its not explicitly set, Problem Solved!

And of course i dont want to be a leach i can send you a PR if you want.

Cheers

/A

image

Activity

  1. LucasBassetti commented on Sep 26, 2026

    @LucasBassetti
    Owner

    This is fixed in #392: options without a value are now selected by their label (before, every option matched the first one).

    It will be part of the next release. Closing, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions