Giter Club home page Giter Club logo

jhyland87 / datatables-keep-conditions Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 6.0 196 KB

Store the DataTable conditions within the URL hash every time a condition is changed, such as the page, length, search or a column order, making it possible to copy/paste the URL. Once said URL is loaded, the conditions will be retrieved from the URL hash and implemented to the table

Home Page: http://linuxdigest.org/misc/script_examples/DataTables-Keep-Conditions/examples/

License: MIT License

JavaScript 100.00%

datatables-keep-conditions's People

Contributors

jhyland87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

datatables-keep-conditions's Issues

Change Key Of KeepConditions

Just tried to find a way to set a custom key for the URL key parameter of KeepConditions. By default the table id of DataTables is used. For sure that makes sense. Especially if there is more then one table on the page. But I have one case where I would customize the key name but can't easily change the DataTables ID itself.

Already tried to manually set the name for _tableId but the URL is still using the DatTables ID name. Any idea how to archive this?

domain.com/#example=l25:od3
domain.com/#e=l25:od3

History not working

Although the plugin changes the # part of the url, the back button on the browser doesn't cause a table reload as would be expected.

Extra parameters

Hi! First of all, great plugin!
Is there a way to add a custom parameter that will use the hash as transport?
I need to separate the term that is sent to the server from any term that is used to filter data in the respons.
I have the need to initialize datatable from url but without filter (f).
One might say that I need one parameter that is the search term that is used in ajax to get data. This is to be distinguished from the "f" parameter used for filtering the data from the server.
Thanks/F

keep page does not work with servserside processing

Hi,

thank you for your amazing plugin, it works flawless so far.

The only thing that is not working with current datatable version (1.10.10) is keep the page with serverside processing.

it removes the page number from the hash as soon as the datable is initialized.

[Suggestion]: Add option to prevent history

It'd be nice to have an option to turn on/off the creation of browser history entries. Unless I'm missing something, right now, when I type "t-e-s-t" into the global search input field, I get 4 entries into my browser history. This means that I'll have to hit the back button 4 times to actually go back to my previous page.

The most obvious fix would be to modify structureHash:322 and change window.location.hash = newHash || '_' to window.history.replaceState(undefined, undefined, newHash || '_'). This would manipulate the browser history and change the 'current' entry to be the new URL.

More info:

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.