Fit.UI icon indicating copy to clipboard operation
Fit.UI copied to clipboard

DropDown: Visible placeholder results in control appearing disabled

Open Jemt opened this issue 2 years ago • 0 comments

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 avatar Jun 13 '23 18:06 Jemt