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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
contentEditable="true"
for thetd
attribute.Also, is setting the column header to contentEditable the best way to allow this feature on columns? Wouldn't the more common use-case be that you want only the cells to be contentEditable and not the header row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
td
is created as a string, so this is the only way to append the attribute.That's true. One approach is to use a custom class
editable
/columnEditable
as a check instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the attribute name, I was referring to the fact that you have
contenteditable
instead ofcontentEditable
(capitalized "Editable").Yeah, I'm thinking as a data attribute, like
data-contenteditable
or maybe namespaced to avoid conflicts with other libraries likedata-dynatable-contenteditable
on theth
element in the column header cell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was aware that I didn't use the camelCase; I should have mentioned this earlier.
Though it isn't meant to be
contentEditable
http://www.w3.org/TR/2008/WD-html5-20080610/editing.html#contenteditable0 ?(I can't edit this PR that since I removed the branch a long time ago...making a new one)