-
Notifications
You must be signed in to change notification settings - Fork 171
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- OS: Windows
- Node Version: v24.10.0
- Package: @clack/prompts
- Package Version: 1.0.0
Describe the bug
In the autocomplete prompt the disabled options are working.
To Reproduce
That is part of my code.
const autocompletePrompt = await autocomplete({
message: "procure um servidor para conectar",
options: servers.map((s) => {
let hint = `${s.username}@${s.host}${s.description ? ` - ${s.description}` : ""}`;
let label = `${s.name} [${s.isProduction ? "PRD" : "NPD"}] `;
if (s.isSegura) {
label += `SEGURA`;
hint = `${psshConfig.netUser}[${s.username}@${s.host}]@${psshConfig.seguraHost}.${psshConfig.netDomain}`;
}
if (s.username) {
label += ` <${s.username}>`;
}
if (s.databases && s.databases.length > 0) {
hint = "";
s.databases.forEach((db, index) => {
if (index > 0) {
hint += ", ";
}
hint += `${db}`;
});
}
console.log(
"🚀 ~ main ~ s.isSegura && !s.username:",
s.host + " " + (s.isSegura && !s.username),
);
return {
value: s.name,
label: label,
hint: hint,
disabled: true,
};
}),
placeholder: "Digite o nome do servidor para conectar",
maxItems: 10,
});So I tried to force all options to be disabled but they all are enabled.
Expected behavior
I think I shoudn't select disabled options
Additional Information

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Needs triage