A React component wrapping Monaco Editor to provide an SQL editor with syntax highlighting, intelligent autocomplete, and SQL formatting (Ctrl+Shift+F). Current stable version is 1.0.18, released monthly. Supports single or multiple database schemas for context-aware suggestions of tables, columns, and SQL keywords. Ships TypeScript types and requires React 17–19 as peer dependencies.
npm install sql-editor-componentNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage with database structure for autocomplete, custom font size, and legend.
npm install @types/react @types/react-dom --save-dev
Use useRef or useCallback to capture latest sql value.
Use `onChange` to sync external state.
Omit `runButton` entirely if you do not want a run button.
Pass <CustomButton /> as JSX element, not the component reference.
Provide a valid Database object or array; empty array results in no schema completions.
No fix available; plan for localization is not documented.
Replace `import { SqlEditor } from 'sql-editor-component'` with `import SqlEditor from 'sql-editor-component'`Run `npm install @types/react @types/react-dom --save-dev` and restart the TS server.
Ensure `node_modules` is properly hoisted; try `npm dedupe` or install monaco-editor explicitly if needed.
Upgrade to >=1.0.18 or wrap the component to filter out custom props.