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

Allow deselect on dropdowns #155

Open
MikeLister opened this issue Oct 20, 2023 · 0 comments
Open

Allow deselect on dropdowns #155

MikeLister opened this issue Oct 20, 2023 · 0 comments

Comments

@MikeLister
Copy link
Collaborator

Bar with dropdown e.g. from line 26:

// Add the placeholder option
optns.append('option'); // Placeholder text

optns
	.selectAll('option.option')
	.data(uniqueOptions)
	.enter()
	.append('option')
	.attr('value', (d) => d)
	.text((d) => d);



		//add some more accessibility stuff
d3.select('input.chosen-search-input').attr('id', 'chosensearchinput');
d3.select('div.chosen-search')
	.insert('label', 'input.chosen-search-input')
	.attr('class', 'visuallyhidden')
	.attr('for', 'chosensearchinput')
	.html('Type to select an area');

$('#optionsSelect').chosen({placeholder_text_single: 'Select an option', allow_single_deselect: true})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant