Skip to content

Commit

Permalink
Update Autosize Code Editor (#179)
Browse files Browse the repository at this point in the history
* update to 3.5.1

* Update package-lock.json

---------

Co-authored-by: asimonok <sashasimonok@gmail.com>
Co-authored-by: Mikhail Volkov <mikhail@volkovlabs.io>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent b716095 commit e51d872
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@react-aria/focus": "^3.18.4",
"@tanstack/react-table": "^8.20.5",
"@tanstack/react-virtual": "^3.10.8",
"@volkovlabs/components": "^3.5.0",
"@volkovlabs/components": "^3.5.1",
"@volkovlabs/grafana-utils": "^1.4.4",
"file-saver": "^2.0.5",
"markdown-it": "^14.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ export const NestedObjectCardsItem: React.FC<Props> = ({
{isEditing ? (
<Field>
<AutosizeCodeEditor
value={itemPayload.body.replaceAll('\\n', '\n')}
value={itemPayload.body}
onChange={(body) => {
/**
* itemPayload is cached here somehow so use value from callback
*/
setLocalValue((current) => ({
...current,
body: body.replaceAll('\n', '\\n'),
body: body,
}));
}}
language="markdown"
Expand Down

0 comments on commit e51d872

Please sign in to comment.