Preserve JSON/XPath filter (Closes #22)

This commit is contained in:
Gregory Schier
2024-06-03 13:49:51 -07:00
parent f4c91d131c
commit a0b08614f0
4 changed files with 41 additions and 21 deletions

View File

@@ -195,7 +195,7 @@ export const Editor = forwardRef<EditorView | undefined, EditorProps>(function E
placeholderCompartment.current.of(
placeholderExt(placeholderElFromText(placeholder ?? '')),
),
wrapLinesCompartment.current.of([]),
wrapLinesCompartment.current.of(wrapLines ? [EditorView.lineWrapping] : []),
...getExtensions({
container,
readOnly,
@@ -357,8 +357,7 @@ function getExtensions({
blur: () => {
onBlur.current?.();
},
keydown: (e, cm) => {
console.log('KEY DOWN', e, cm);
keydown: (e) => {
onKeyDown.current?.(e);
},
paste: (e) => {

View File

@@ -9,7 +9,7 @@ export function FormattedError({ children }: Props) {
return (
<pre
className={classNames(
'w-full select-auto cursor-text bg-gray-100 p-3 rounded',
'w-full select-auto cursor-text bg-background-highlight-secondary p-3 rounded',
'whitespace-pre-wrap border border-fg-danger border-dashed overflow-x-auto',
)}
>