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

Bug Fix events on inner elements overriden by the existence of a custom render function #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 13, 2017

  1. Bug Fix events on inner elements overriden by the existence of a cust…

    …om render function
    
    This addresses the following scenario:
    
    I am adding existing (non-rendered to the DOM) TRs to DT with events
    attached to their children.
    
    I want a custom render function for providing filter and sort data, but
    not display data. If there is a custom render function it overrides all
    data including display data and overwrites the original cell content
    (even if the data is unchanged) which results in the fact that events
    of children inside the cell are lost.
    
    This could be prevented if the render function can signal DT that it
    doesn’t want to override the data and it wants to use the original
    display data. Returning undefined is a good signal.
    
    To address this issue, before overwriting the innerData of a cell using
    the display data from the custom render function you can check whether
    the data is null (undefined gets turned into null at this point).
    
    And for all intents and purposes there is no point in overwriting the
    cell content with null or undefined. Of course overwriting it with an
    empty string ”” works correctly and would replace the display data (so
    does null).
    itay-grudev committed Jan 13, 2017
    Configuration menu
    Copy the full SHA
    e13f20f View commit details
    Browse the repository at this point in the history