@sqlrooms/sql-editor / SqlEditorModal
Function: SqlEditorModal()
SqlEditorModal(
props
,deprecatedLegacyContext
?):ReactNode
A modal wrapper for the SQL Editor component that provides a full-screen dialog interface.
This component wraps the main SqlEditor component in a modal dialog, making it suitable for overlay/popup usage scenarios. It inherits all props from SqlEditorProps and handles the modal-specific behavior.
Parameters
Parameter | Type | Description |
---|---|---|
props | Props | - |
deprecatedLegacyContext ? | any | Deprecated See React Docs |
Returns
ReactNode
Example
tsx
<SqlEditorModal
isOpen={true}
onClose={() => setIsOpen(false)}
sqlEditorConfig={config}
onChange={handleConfigChange}
/>
See
SqlEditor for detailed documentation of all available props
Props
SqlEditorProps The component accepts all props from SqlEditorProps:
isOpen
- Whether the SQL editor modal is currently visibleonClose
- Callback fired when the modal should be closedsqlEditorConfig
- Configuration object containing queries and selected query stateonChange
- Callback fired when the SQL editor configuration changesschema
- Optional database schema to use for queries (defaults to 'main')documentationPanel
- Optional component to render SQL documentation in the side panelonAddOrUpdateSqlQuery
- Callback fired when a new table should be created from query results