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

[Feature Request]Add a GetAllLocalStorageKeys() method #256

Open
SvdSinner opened this issue Jan 14, 2025 · 0 comments
Open

[Feature Request]Add a GetAllLocalStorageKeys() method #256

SvdSinner opened this issue Jan 14, 2025 · 0 comments
Labels
Feature Request Request to add a new feature Triage Issue needs to be triaged

Comments

@SvdSinner
Copy link

SvdSinner commented Jan 14, 2025

Is your feature request related to a problem? Please describe.
The one glaring omission of Blazored.LocalStorage is that there is no way to see what keys are already in local storage. I cache recent result sets, and when I look for the result sets, I need to know if "ResultSet|-Name-" exists. (NOTE: For what I'm doing, more that one might be usable, and I need to know what the options are. I can't just try to get "ResultSet|-Name-" and handle if it is null.)

Describe the solution you'd like
Add a method to LocalStorageService called GetAllLocalStorageKeys (or whatever) that returns an array of string with all keys currently populated in LocalStorage. Note: In javascript, you get the data with "Object.keys(localStorage)"

Describe alternatives you've considered
I can write code to do this outside of your nuget package, but it seems silly to build another service just for this one function, especially since it is so easy to do inside of your nuget package

Additional context
How it is done in JavaScript

@SvdSinner SvdSinner added Feature Request Request to add a new feature Triage Issue needs to be triaged labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request to add a new feature Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant