Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropDown: Visible placeholder results in control appearing disabled #190

Open
Jemt opened this issue Jun 13, 2023 · 0 comments
Open

DropDown: Visible placeholder results in control appearing disabled #190

Jemt opened this issue Jun 13, 2023 · 0 comments

Comments

@Jemt
Copy link
Owner

Jemt commented Jun 13, 2023

See https://jsfiddle.net/zhewnm1a/

Notice how the control appears dimmed as if it was disabled.
image

When we select a value, the arrow becomes visibly darker and now appears enabled.
image

image

Fit.Events.OnReady(function()
{
	var lv = new Fit.Controls.ListView();
	Fit.Array.ForEach(GetUsers(), function(user)
	{
		lv.AddItem(user.Name, user.Mail);
	});
	
	var dd = new Fit.Controls.DropDown("DropDown1");
	dd.SetPicker(lv);
	dd.MultiSelectionMode(false);
	dd.Placeholder("Select a user..");
	dd.Width(300);
	dd.DropDownMaxHeight(150);
	dd.InputEnabled(true);
	dd.Render(document.body);
});

// ============================
// Get demo data
// ============================

window.GetUsers = function(picker)
{
	var users =
	[
		{ Name: "James Thomson", Mail: "[email protected]" },
		{ Name: "Hans Törp", Mail: "[email protected]" },
		{ Name: "Ole Shortsom", Mail: "[email protected]" },
		{ Name: "Michael Burström", Mail: "[email protected]" },
		{ Name: "Ilda Longstum", Mail: "[email protected]" },
		{ Name: "Martin Grom", Mail: "[email protected]" },
		{ Name: "Anders Handsom", Mail: "[email protected]" },
		{ Name: "Jacob Marking", Mail: "[email protected]" },
		{ Name: "Jan Jacksson", Mail: "[email protected]" },
		{ Name: "Christian Fros", Mail: "[email protected]" }
	];
	
	return users;
}
@Jemt Jemt added bug minor bug and removed bug labels Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant