Skip to content

Commit

Permalink
🐛 Make persistence props optional
Browse files Browse the repository at this point in the history
  • Loading branch information
snehilvj committed Nov 15, 2022
1 parent f841180 commit 3d0c432
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

# 0.11.0a2

### Fixed

- Make persistence props optional.

# 0.11.0a1

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash_mantine_components",
"version": "0.11.0a1",
"version": "0.11.0a2",
"description": "Plotly Dash Components based on Mantine",
"main": "index.ts",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions src/ts/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,20 +488,20 @@ export type PersistenceProps = {
* the new `value` also matches what was given originally.
* Used in conjunction with `persistence_type`.
*/
persistence: boolean | string | number;
persistence?: boolean | string | number;

/**
* Properties whose user interactions will persist after refreshing the
* component or the page. Since only `value` is allowed this prop can
* normally be ignored.
*/
persisted_props: Array<string>;
persisted_props?: Array<string>;

/**
* Where persisted user changes will be stored:
* memory: only kept in memory, reset on page refresh.
* local: window.localStorage, data is kept after the browser quit.
* session: window.sessionStorage, data is cleared once the browser quit.
*/
persistence_type: "local" | "session" | "memory";
persistence_type?: "local" | "session" | "memory";
};

0 comments on commit 3d0c432

Please sign in to comment.