Giter VIP home page Giter VIP logo

Comments (7)

iammukeshm avatar iammukeshm commented on June 16, 2024

Yeah, I have actually tried this earlier. But the issue is after storing these values to localStorage (like other settings), how do we make the table component retrieve and refresh these changes.

from blazor-wasm-boilerplate.

fretje avatar fretje commented on June 16, 2024

We could have these settings in a global "themesettings" cascading value which has these properties to bind against?

from blazor-wasm-boilerplate.

iammukeshm avatar iammukeshm commented on June 16, 2024

Not sure if Cascading Values allow two-way binding. It only can transfer data from parent to child components.

In our case, the flow would be like this

ThemeManager Component --> Parent (MainLayout Probably) --> EntityTable Component

from blazor-wasm-boilerplate.

fretje avatar fretje commented on June 16, 2024

Hmm jep... I didn't say it was gonna be easy :-D

I'm sure there must be a way... isn't this what blazor is all about? ;-)

Maybe we should post the question on the mudblazor repo or discord...

from blazor-wasm-boilerplate.

iammukeshm avatar iammukeshm commented on June 16, 2024

Probably can be a mix of EventCallBack and CascadingParams. Will try.

from blazor-wasm-boilerplate.

fretje avatar fretje commented on June 16, 2024

waj on discord mentioned something that might be interesting;

have a look at this https://github.com/aksoftware98/blazor-utilities
we can subscribe to get updates on theme settings

If we were to use this, then from ThemeManager pane you can just send update messages (updateDense, updateBordered and updateStriped (for instance) with their respective values).
We can then maybe create an FSHTable which derives from MudTable (similar like I made BrandsAutocomplete) which takes care of subscribing and responding to these messages?
Then we just replace <MudTable> everywhere with <FSHTable>...

from blazor-wasm-boilerplate.

iammukeshm avatar iammukeshm commented on June 16, 2024

Do review this. May require minor cleanups

from blazor-wasm-boilerplate.

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.