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

disable edit when onEdit==FALSE #32

Merged
merged 2 commits into from
Nov 2, 2019

Conversation

sambaala
Copy link
Contributor

Hello,
In the current version, when onEdit=T, the edit icon stays on the view, but it cannot be edited. When onEdit=F, it can be edited. It is the same beharvior for onDelete, onAdd and OnSelect. Is it an issue? Things seems inverted on the following lines

onEdit: x.onEdit ? x.onEdit : function(value) {logChange(value,"edit")},
onAdd: x.onAdd ? x.onAdd : function(value) {logChange(value,"add")},
onDelete: x.onDelete ? x.onDelete : function(value) {logChange(value,"delete")},
onSelect: x.onSelect ? x.onSelect : function(value) {logChange(value,"select")},
.
Regards,
Alassane

@timelyportfolio
Copy link
Owner

@sambaala thanks so much for posting this. I think there might be some confusion around the on* props which are the callback functions when an event occurs and the currently missing (in listviewer) props controlling whether edit, add, etc. are enabled. I will add these props, and I think the problem will be solved.

@timelyportfolio
Copy link
Owner

@sambaala never mind I see what you are saying. I like your change and will go with that, and then I will try to clarify in the documentation. Thanks!!

@timelyportfolio timelyportfolio merged commit a9ca009 into timelyportfolio:master Nov 2, 2019
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

Successfully merging this pull request may close these issues.

2 participants