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

DataTable inline editor cannot be cancelled by e.stopPropagation() #1983

Open
Anode1 opened this issue Dec 5, 2014 · 0 comments
Open

DataTable inline editor cannot be cancelled by e.stopPropagation() #1983

Anode1 opened this issue Dec 5, 2014 · 0 comments

Comments

@Anode1
Copy link

Anode1 commented Dec 5, 2014

Hi,

We need DataTable inline editors to appear for some particular cells only, based on a parameter which is passed in json along the data.
(Here is yui2 code snippet from an app which has to be ported to yui3: http://jsfiddle.net/Anode/w4u1j6fh/)
I've put yui3 code into: http://jsfiddle.net/Anode/jd0cvmq8/2/ which still does not implement the old functionality fully.
BTW In the new (yui3) code refresh of the table data (by selecting a tab) "kills" the possibility to access properties (making an error) from DOM, this is the second problem I have, so please do not change tabs after initial run*.

So the 1st question is: how to cancel/hide inline editor in yui3 in the same way as we were doing it in yui2 (so, only green cells are editable, as in the table on the first link)?

Why e.stopPropagation() does not work (line 225)? If it is wrong way to cancel event bubbling up, then how to cancel the editor by other means?

   Y.delegate('click', function(e){
        ...
        if(state!='w'){
            e.stopPropagation(); //this does not consume the event
            alert('why stop propagation has been ignored and editor created?');
            return;
        }
   }

Thanks
Vasili

  • To reproduce: a) reload the table. Not clicking on tabs - click on a cell (alert will appear); b) Select a different tab (DataTable will be completely recreated). Click on a cell. No alert due to error ("Cannot read property 'get' of null", after getRecord() call)
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

No branches or pull requests

1 participant