FBaseUI
Access
Access through:
Setup
Register @univerjs-pro/bases-ui or a preset that includes it. In plugin mode, import @univerjs-pro/bases-ui/facade. Additional methods below require their listed plugin packages. See Facade setup.
@univerjs-pro/bases-ui
FBaseUI.activateTable
Activates a table in the Base UI state.
activateTable(tableId: string): Promise<void>Parameters
tableId— Required.
Types: Promise
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.activateView
Activates a view in the Base UI state.
activateView(viewId: string): Promise<void>Parameters
viewId— Required.
Types: Promise
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.closeLeftSidebar
Marks the left sidebar as hidden in the Base UI state.
closeLeftSidebar(): voidPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.closeRecordDetail
Closes the record detail panel and clears its active record or draft.
closeRecordDetail(): voidPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.closeRightSidebar
Marks the right sidebar as hidden in the Base UI state.
closeRightSidebar(): voidPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getActiveTableId
Returns the active table id, or null when no table is active.
getActiveTableId(): string | nullPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getActiveViewId
Returns the active view id, or null when no view is active.
getActiveViewId(): string | nullPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getGroupOptions
Returns a shallow copy of the configured group options, or an empty array when none are configured.
getGroupOptions(): IBasePeopleOption[]Types: IBasePeopleOption
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getPersonOptions
Returns a shallow copy of the configured person options, or an empty array when none are configured.
getPersonOptions(): IBasePeopleOption[]Types: IBasePeopleOption
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getRenderedView
Currently returns null; this facade does not expose a rendered view instance yet.
getRenderedView(): FBaseRenderedView | nullTypes: FBaseRenderedView
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.getSelection
Returns the current Base selection, or null when no selection is set.
getSelection(): BaseSelection | nullTypes: BaseSelection
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openDraftRecordDetail
Opens a draft record detail panel with initial field values.
openDraftRecordDetail(values?: Record<string, unknown>): voidParameters
values— Optional. Default:{}.
Types: Record
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openFieldConfigPanel
Sets the field id targeted by the field configuration panel.
openFieldConfigPanel(fieldId: string): voidParameters
fieldId— Required.
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openLeftSidebar
Marks the left sidebar as visible in the Base UI state.
openLeftSidebar(): voidPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openRecordDetail
Opens the detail panel for an existing record.
openRecordDetail(recordId: string): voidParameters
recordId— Required.
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openRightSidebar
Marks the right sidebar as visible in the Base UI state.
openRightSidebar(): voidPackage: @univerjs-pro/bases-ui · Type definitions
FBaseUI.openViewSettingsPanel
Sets the view id targeted by the view settings panel.
openViewSettingsPanel(viewId: string): voidParameters
viewId— Required.
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.scrollToField
Sets scroll offsets for the requested view, or the active view when no view id is provided.
The current implementation uses options.x and options.y (defaulting to zero); it does not locate the field.
scrollToField(_fieldId: string, options?: IScrollToRecordOptions): voidParameters
_fieldId— Required.options— Optional. Default:{}.
Types: IScrollToRecordOptions
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.scrollToRecord
Sets scroll offsets for the requested view, or the active view when no view id is provided.
The current implementation uses options.x and options.y (defaulting to zero); it does not locate the record.
scrollToRecord(_recordId: string, options?: IScrollToRecordOptions): voidParameters
_recordId— Required.options— Optional. Default:{}.
Types: IScrollToRecordOptions
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.setGroupOptions
Replaces the group options in the Base UI configuration.
setGroupOptions(options: IBasePeopleOption[]): voidParameters
options— Required.
Types: IBasePeopleOption
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.setPersonOptions
Replaces the person options in the Base UI configuration.
setPersonOptions(options: IBasePeopleOption[]): voidParameters
options— Required.
Types: IBasePeopleOption
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.setSelection
Updates the Base selection. Pass null to clear it.
setSelection(selection: BaseSelection | null): voidParameters
selection— Required.
Types: BaseSelection
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.startEditingCell
Starts editing the specified cell and selects it if it is not already selected.
startEditingCell(input: IStartEditingCellInput): voidParameters
input— Required.
Types: IStartEditingCellInput
Package: @univerjs-pro/bases-ui · Type definitions
FBaseUI.stopEditingCell
Clears the active cell editing target and notifies editor subscribers.
stopEditingCell(): voidPackage: @univerjs-pro/bases-ui · Type definitions
How is this guide?