Skip to content

ptrushin/proton-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proton-state

examples

https://codesandbox.io/s/github/ptrushin/proton-state-examples

Try to play:

  • Add filter Category - Address bar and Grid changed
  • Add filter Product, it depends on Category
  • Change filter on column OrderDate in Gird - Address bar and Grid changed
  • Click with alt key on cell in column Quantity - all filtered by its value - Address bar and Grid changed
  • Now you can copy address from address bar and open it in other tab - all filters applied
  • Change column order and reload page, now aggird state store in localstorage and you can copy/paste state

install

npm install proton-state

add to AgGrid

in component ctor

this.protonState = new ProtonState(
{
    history: props.history,
    onChange: this.onStateChange
});

in componentDidMount and componentDidUpdate

this.protonState.updateState();

in onGridReady AgGrid event

onGridReady = params => {
    this.protonState.addStateProvider(new AgGridStateProvider({api: params.api}))
    ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published