Hacker News new | ask | show | jobs
by SpaghettiCthulu 1032 days ago
We actually do. Thanks to the "indeterminate" state on HTML checkboxes (that one where it's sort of filled in instead of checked), you can use unchecked for "exclude" or "must not have", indeterminate for "don't care" or "both" and checked for "include" or "must have".

Unfortunately, in typical browsers there is no way for the user to set them back to indeterminate unless the developer implements that using javascript.

1 comments

An interesting suggestion, but ‘indeterminate’ maps to nullish values, not to negative values.

If you have options such as “oak”, “teak” and “walnut”, and there are some options outside of those, how do you allow users to select neither oak, teak or walnut? It’s not through selecting one or all as indeterminate — it’s gotta be through some other mechanism.