Skip to content

Commit e9cef6f

Browse files
committed
0.0.22
1 parent 2480764 commit e9cef6f

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

chartlets.js/CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Version 0.0.22 (from 2024/11/19)
2+
3+
* Improved robustness while rendering the in `Select` component
4+
wrt `options` property.
5+
6+
* `Button` component now sets a `clicked: boolean` property instead
7+
of `n_clicks: int`.
8+
19
## Version 0.0.21 (from 2024/11/19)
210

311
* `Component` children can now also be text nodes (of type `string`).

chartlets.js/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chartlets.js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chartlets",
3-
"version": "0.0.21",
3+
"version": "0.0.22",
44
"description": "An experimental library for integrating interactive charts into existing JavaScript applications.",
55
"type": "module",
66
"files": [

chartlets.js/src/lib/components/Button.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ export function Button({
1616
disabled,
1717
onChange,
1818
}: ButtonProps) {
19-
const handleClick = (event: MouseEvent<HTMLButtonElement>) => {
19+
const handleClick = (_event: MouseEvent<HTMLButtonElement>) => {
2020
if (id) {
2121
onChange({
2222
componentType: "Button",
2323
id: id,
24-
// Compat with plotly/dash
25-
property: "n_clicks",
26-
// TODO: get number of mouse clicks
27-
value: event.buttons,
24+
property: "clicked",
25+
value: true,
2826
});
2927
}
3028
};

chartlets.js/src/lib/components/Select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function Select({
5050
disabled={disabled}
5151
onChange={handleChange}
5252
>
53-
{options &&
53+
{Array.isArray(options) &&
5454
options.map(normalizeSelectOption).map(([value, text], index) => (
5555
<MuiMenuItem key={index} value={value}>
5656
{text}

chartlets.py/CHANGES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 0.0.21 (in development)
1+
## Version 0.0.22 (in development)
22

33
* `Component` children can now also be text nodes (of type `string`).
44

@@ -8,6 +8,9 @@
88
(to refer to MUI component with same name).
99

1010
* `Select` component has more flexible options.
11+
12+
* Dealing with callbacks parameter and return types
13+
that are just `list` and not, e.g., `list[str]`.
1114

1215
## Version 0.0.16 (from 2024/11/12)
1316

chartlets.py/chartlets/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.0.21"
1+
version = "0.0.22"

0 commit comments

Comments
 (0)