@sqlrooms/sql-editor / SqlEditorModal
Function: SqlEditorModal()
SqlEditorModal(
props
):ReactNode
|Promise
<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 |
---|---|
props | Props |
Returns
ReactNode
| Promise
<ReactNode
>
Example
tsx
<SqlEditorModal
isOpen={true}
onClose={() => setIsOpen(false)}
sqlEditorConfig={config}
onChange={handleConfigChange}
/>
See
- SqlEditor for detailed documentation of all available 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