mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(editor): clicking the sorting button results in an error (#10800)
This commit is contained in:
@@ -63,9 +63,7 @@ export class DataViewRenderer extends SignalWatcher(
|
||||
}
|
||||
`;
|
||||
|
||||
private readonly _view = signal<{
|
||||
expose: DataViewInstance;
|
||||
}>();
|
||||
private readonly _view = signal<DataViewInstance>();
|
||||
|
||||
@property({ attribute: false })
|
||||
accessor config!: DataViewRendererConfig;
|
||||
@@ -121,7 +119,7 @@ export class DataViewRenderer extends SignalWatcher(
|
||||
});
|
||||
|
||||
focusFirstCell = () => {
|
||||
this.view?.expose.focusFirstCell();
|
||||
this.view?.focusFirstCell();
|
||||
};
|
||||
|
||||
openDetailPanel = (ops: {
|
||||
@@ -224,7 +222,7 @@ export class DataView {
|
||||
private readonly _ref = createRef<DataViewRenderer>();
|
||||
|
||||
get expose() {
|
||||
return this._ref.value?.view?.expose;
|
||||
return this._ref.value?.view;
|
||||
}
|
||||
|
||||
render(props: DataViewRendererConfig) {
|
||||
|
||||
@@ -44,9 +44,7 @@ type DataViewComponent = UniComponent<
|
||||
{
|
||||
props: DataViewProps;
|
||||
},
|
||||
{
|
||||
expose: DataViewInstance;
|
||||
}
|
||||
DataViewInstance
|
||||
>;
|
||||
|
||||
export interface DataViewRendererConfig {
|
||||
|
||||
Reference in New Issue
Block a user