Hide dropdown icon to do not toggle & callback function to know if is editable or no #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation 😇
The first problem I had was to can't remove the toggle icon when the user is not in edit mode. If in the custom component prop to toggle receive an empty container and the user press on that area the toggle gonna trigger.
The second was to do not have a way to know if the options list is displaying or not.
Actions💻
To fix the first issue, I added a prop that allows to do not display anything.
To fix the second, I added a prop that calls a callback function to get the current status of the toggle (if the options lists are being displayed or not).
Thanks for your attention,
Bruno.