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

singleSelect not respected when selected === true on map config and/or multiple area config #370

Closed
techfg opened this issue Feb 14, 2021 · 1 comment

Comments

@techfg
Copy link
Collaborator

techfg commented Feb 14, 2021

Describe the bug
When singleSelect === true, IM should only allow a single area to be selected per the docs. However, when the map configuration has selected === true and/or multiple areas are defined with selected === true, IM does not enforce singleSelect behavior. Technically, this would be a misconfiguration but IM should likely enforce singleSelect regardless of selected configuration. This same issue occurs when rebind is called as well.

There is something to be said for permitting the misconfiguration and ignoring it (aka. treating it as intentional) and thus allowing multiple areas to be selected until an area is clicked by user and/or set/selected via API. Community feedback encouraged on how to handle this.

To Reproduce
Steps to reproduce the behavior:

  1. Go to jsFiddle - selected is true in the map configuration
  2. All areas are selected despite singleSelect === true
  3. Go to jsFiddle - selected is true for configured areas paul & ringo
  4. paul & ringo are both selected

Expected behavior
IM should enforce singleSelect and only select the first area it encounters that is selected === true

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

@techfg
Copy link
Collaborator Author

techfg commented Feb 21, 2021

Per this test case, singleSelect should be ignored when applying selected state from configuration. This is working as expected so closing this issue.

@techfg techfg closed this as completed Feb 21, 2021
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