manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.07k stars 336 forks source link

Style doesn't show Up When Using custom templates with select #172

Open ABDERRAHMANE-OUALI opened 3 years ago

ABDERRAHMANE-OUALI commented 3 years ago

HI I'm using templates with select mode in promptUI this is the following templates


templates := &promptui.SelectTemplates{
    Active:   `{{'👉' .Title | cyan | bold }}`,
    Inactive: `   {{ .Title | cyan }}`,
    Selected: `{{ "✔" | green | bold }} {{ "Recipe" | bold }}: {{ .Title | cyan }}`,
}

and then add it to propmptUI


    prompt := promptui.Select{
        Label: "Select A Project setup",
        Items: []string{"React-Typescript", "ReactNative-Expo-Typescript"},
        Templates: templates,   
    }

    _, result, err := prompt.Run()

The Expected Result : image

The Given Result : image

dosen't even show the cursor to select the options