Coder Social home page Coder Social logo

Grid error inserting new row about dgrid HOT 12 CLOSED

sitepen avatar sitepen commented on August 15, 2024
Grid error inserting new row

from dgrid.

Comments (12)

kfranqueiro avatar kfranqueiro commented on August 15, 2024

Hi,

What kind of store are you using? Would it be possible for you to provide a test page (either via a branch, or a gist)? I'm unable to reproduce the 2-rows-with-1-item issue with dojo/store/Memory + Observable, and I haven't seen the main failure you're mentioning either, so I need some help to reproduce either issue. Thanks!

from dgrid.

myersware avatar myersware commented on August 15, 2024

I'm using Memory + Observable. I'll try to work up a test case tomorrow.
One possible clue: it's a multiple row layout using subRows...

On 1/3/2012 5:40 AM, Kenneth G. Franqueiro wrote:

Hi,

What kind of store are you using? Would it be possible for you to provide a test page (either via a branch, or a gist)? I'm unable to reproduce the 2-rows-with-1-item issue with dojo/store/Memory + Observable, and I haven't seen the main failure you're mentioning either, so I need some help to reproduce either issue. Thanks!


Reply to this email directly or view it on GitHub:
#59 (comment)

Jim Myers

The TBone way, perfection is sacrificed for energy and impact.

from dgrid.

myersware avatar myersware commented on August 15, 2024

Ken,
I've fixed the error on inserting new row by putting 'doLayout: false'
on a containing dijit.form.Form widget.

I still have the issue with 1 item in the store displaying 2 rows. My
test case can be found here:
https://portal-jm.dhat.org/portal/rp/dgrid_bug_test2.htm

The error occurs in both Firefox and Chrome so it's probably not a
browser issue.

It is probably because of a complex page structure.
The grid in question is in a titlepane inside a tabcontainer inside
bordercontainer.

I was having trouble getting it fail. It finally failed when I added a
second tab to the tab container.
The tab with the grid in it is NOT initially visible. When I make it
visible, the double items appear!!!

Jim

On 1/3/2012 5:40 AM, Kenneth G. Franqueiro wrote:

Hi,

What kind of store are you using? Would it be possible for you to provide a test page (either via a branch, or a gist)? I'm unable to reproduce the 2-rows-with-1-item issue with dojo/store/Memory + Observable, and I haven't seen the main failure you're mentioning either, so I need some help to reproduce either issue. Thanks!


Reply to this email directly or view it on GitHub:
#59 (comment)

Jim Myers

The TBone way, perfection is sacrificed for energy and impact.

from dgrid.

myersware avatar myersware commented on August 15, 2024

Another update - with the hidden tab, the add new row bug also manifests
if you click on the Add button.
You'll see an like "_46 is null" - that's the parent null I mentioned
originally.

Jim Myers

On 1/3/2012 5:40 AM, Kenneth G. Franqueiro wrote:

Hi,

What kind of store are you using? Would it be possible for you to provide a test page (either via a branch, or a gist)? I'm unable to reproduce the 2-rows-with-1-item issue with dojo/store/Memory + Observable, and I haven't seen the main failure you're mentioning either, so I need some help to reproduce either issue. Thanks!


Reply to this email directly or view it on GitHub:
#59 (comment)

Jim Myers

The TBone way, perfection is sacrificed for energy and impact.

from dgrid.

kfranqueiro avatar kfranqueiro commented on August 15, 2024

While I've become aware of a few issues related to grids which get startup called sooner than it ideally should be, the double-row issue in your page isn't something I've encountered. I attempted to come up with a reduced test case to reproduce your issue, but still only see one row.

You can see what I attempted at https://gist.github.com/1563785

On the other hand, there is seemingly a LOT going on in your page, including an alarming number of both AMD-format and legacy style module loads scattered around (some of which I figure are repetitive of others), making it rather hard to follow. I have a feeling that if you attempt to reduce your page to isolate the grid in the inactive tab, you may end up resolving this particular problem along the way.

I also wasn't able to reproduce the first issue you mentioned. I'm rather curious what could cause parent to be undefined in that code.

from dgrid.

kfranqueiro avatar kfranqueiro commented on August 15, 2024

Whoops, forgot to check the last update. That's kind of interesting... what I find more interesting is that if I call refresh on that grid before clicking add, firstly it reduces to just the one copy of the row as it should be, and secondly the add button works fine. I'm concerned there's some wires being somehow crossed in your example, but I'm not sure what the cause is.

from dgrid.

myersware avatar myersware commented on August 15, 2024

Well, I tried a few more things to no avail. It is clear that just the addition of the first tab (which makes the 2nd tab containing the dgrid not visible), causes the problem to occur.

If you put "selected: true" on the 2nd tab, it displays correctly!

from dgrid.

myersware avatar myersware commented on August 15, 2024

This sounds very similar to bug 57

from dgrid.

myersware avatar myersware commented on August 15, 2024

I have simplified my test case at https://portal-jm.dhat.org/portal/rp/dgrid_bug_test2.htm some to eliminate amd and non-amd loading and am now using 0.2.0 release of dgrid with the same results. if the 2nd tab (the one with the dgrid) is marked selected, it shows properly but if the first tab is selected with the 2nd invisible, when you select the 2nd tab, the double entry displays.

I'm blocked on using dgrid until this is fixed. I'd be happy to test any fix you come up with.

from dgrid.

kfranqueiro avatar kfranqueiro commented on August 15, 2024

Out of curiosity, can you try grabbing the latest code from dgrid's master branch and testing this again, and applying the new extensions/DijitRegistry mixin to your grids? I'm curious if perhaps the problems we've solved with it might also solve yours.

(See the dijit_layout test pages for examples mixing in this extension.)

from dgrid.

myersware avatar myersware commented on August 15, 2024

Cool! My test case (and my real code) now work properly with the mast branch code. When can I expect a new tag with this fix? Thanks a lot!

from dgrid.

kfranqueiro avatar kfranqueiro commented on August 15, 2024

Currently there's no set date for any new tags. I do have a mind to tag 0.2.1, but ideally not before a couple of things in particular get another look.

At any rate, glad to hear this works for you now; thanks for checking again.

from dgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.