Comments (6)
My temp solution:
function storage() { sessionStorage.removeItem('my-storage'); location.reload(); }
my-storage same value as storageName
storage() as onclick button
If there is better option, please comment :)
from jplist-es6.
Could you please recreate your scenario in https://codepen.io/ or other service so i could check this?
from jplist-es6.
Im also having this issue with deep linking. It works when the option is removed but with deep linking true, nothing happens.
from jplist-es6.
I know this is old, but I wanted to provide the solution for those who need it since it wasn't actually resolved here.
The reason this is a problem is because it's not clearing the storage before resetting the fields. After it resets the fields, it first reads from the storage, and then it sets the fields from the storage. You need to clear the storage first.
For Session Storage
sessionStorage.removeItem('my-storage');
jplist.resetControls();
For Deep Linking
location.hash = '';
jplist.resetControls();
from jplist-es6.
Hi @burkybang thanks for this help. We are having the same issue with deep linking. Can you please confirm where
location.hash = '';
jplist.resetControls();
should be put/how it should be used to get the reset working?
Thanks!
from jplist-es6.
@pmacswebteam No prob! It would go in a function for an onclick event just like @Sangvinikis said above.
Here are some examples of ways to achieve this:
<button type="button" onclick="location.hash=''; jplist.resetControls();">
Or:
<button type="button" onclick="resetControls();">Reset Controls</button>
<script type="text/javascript">
function resetControls() {
location.hash = '';
jplist.resetControls();
}
</script>
Or with jQuery:
<button type="button" id="reset-controls">Reset Controls</button>
<script type="text/javascript">
$('#reset-controls').on('click', function() {
location.hash = '';
jplist.resetControls();
});
</script>
from jplist-es6.
Related Issues (20)
- Reset API Example
- Range Slider Steps
- Remove all elements HOT 1
- go back to first page on filter HOT 3
- [Question] about JPList refresh HOT 2
- data-mode-advance
- Selected true not working on Sort datetime
- if controls are added dynamically?
- Not an issue, but rather a question
- Jplist & DatePicker
- Car Demo Page Files
- Option to use disabled attribute instead of class
- Refresh is not working
- When filter with "data-or" is used, sorting goes wrong HOT 1
- Using ajax DataSource? HOT 1
- Vue.js and JPlist
- Storage function not working HOT 1
- Can somone help me setup the pagination part?
- https://www.jplist.org/ does not seem to be working HOT 1
- Is JPLIST still supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jplist-es6.