Adding the originalTR to the record object#230
Open
DotSlashNatalie wants to merge 2 commits intoalfajango:masterfrom
Open
Adding the originalTR to the record object#230DotSlashNatalie wants to merge 2 commits intoalfajango:masterfrom
DotSlashNatalie wants to merge 2 commits intoalfajango:masterfrom
Conversation
Member
|
Thanks for submitting this. I like the idea, but this could potentially cause a large balloon in memory usage for tables with a lot of rows. To pull this in, I'd think about only copying the class name if it exists for the row, and only doing so if a config option to copy row classes is enabled (i.e. add a new config option and make it false by default). |
Author
|
That makes sense. I'll make the modifications in the near future. I've just been handed a big project so I won't be able to make the change for awhile. Feel free to poke this PR if you think I forgot about this. |
Author
|
Is the latest commit what you were thinking of? Here is a sample: http://jsfiddle.net/904zebn5/1/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I made this change in my project because I added a CSS class to certain rows (such as rows to indicate an error). This change allows you to view or access the original tr so that you can copy the CSS class that was applied to it and apply the CSS class to the new tr generation. I'm sure there are better ways to achieve this - but this was my quick patch to get what I needed working.
Example: