Coder Social home page Coder Social logo

Comments (6)

kartik-v avatar kartik-v commented on June 5, 2024

@thelfensdrfer - could you explain your issue a bit more (mention code snippets if needed)?

The widget internally generates an unique id if you do not provide one. So the behavior should technically be the same if you provide an ID or do not.

from yii2-dynagrid.

thelfensdrfer avatar thelfensdrfer commented on June 5, 2024

Ok that is strange. I had multiple pages with grids (different routes/controllers/actions). One grid per page. Before I set an unqiue ID to the widgets, some of them hide all the columns, but not the first I opened. I could show them with the personalize modal so I thought they were hidden because the settings were saved for the first grid widget and the later did not find the saved (cookie) columns of the first one so they got hidden?

from yii2-dynagrid.

kartik-v avatar kartik-v commented on June 5, 2024

I think I understand this - will record a fix for this.

from yii2-dynagrid.

kartik-v avatar kartik-v commented on June 5, 2024

The DynaGrid options['id'] is mandatory. A fix has been provided via commit 80e6fed to validate this and throw an exception if its not set. The docs have also been updated for this.

from yii2-dynagrid.

thelfensdrfer avatar thelfensdrfer commented on June 5, 2024

Great, thank you! Did you validate the issue?

from yii2-dynagrid.

kartik-v avatar kartik-v commented on June 5, 2024

Yes - the auto generated id will work for the storage type session but not for cookie and db. Since, the auto generated id is a random identifier and will not be the same each time for retrieval.

Its better if this control is given to developer to define one's own unique id and make the code simpler and faster.

from yii2-dynagrid.

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.