Skip to content

Commit

Permalink
PullRequest: 192 Fixes oceanbase/odc#376
Browse files Browse the repository at this point in the history
Merge branch 'fix/sprint-4.2.1-bugs-xyh-0925 of [email protected]:oceanbase/oceanbase-developer-center.git into dev-4.2.1

https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/192


Signed-off-by: 晓康 <[email protected]>


* Fixes oceanbase/odc#376

* Fixes oceanbase/odc#376
  • Loading branch information
bluesky-xyh committed Sep 25, 2023
1 parent 44aa5f3 commit 452f03b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/page/Datasource/Recycle/RecycleBinPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import RecycleBinPage from '@/page/Workspace/components/RecycleBinPage';

interface IProps {
dataSourceId: string;
theme?: 'dark' | 'white';
}

export default function RecycleBin({ dataSourceId }: IProps) {
return <RecycleBinPage simpleHeader datasourceId={parseInt(dataSourceId)} />;
export default function RecycleBin({ dataSourceId, theme }: IProps) {
return <RecycleBinPage simpleHeader datasourceId={parseInt(dataSourceId)} theme={theme} />;
}
2 changes: 1 addition & 1 deletion src/page/Datasource/Recycle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface IProps {
datasource: IDatasource;
}
const Recycle: React.FC<IProps> = (props) => {
return <RecycleBin dataSourceId={props.id} />;
return <RecycleBin dataSourceId={props.id} theme="white" />;
};

export default Recycle;
4 changes: 3 additions & 1 deletion src/page/Workspace/components/EditableTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ interface IProps<R extends RowType<R>, SR> extends PickDataGridProps<R, SR> {
enableColumnRecord?: boolean;
gridRef?: React.Ref<DataGridRef>;
bordered?: boolean;
theme?: 'dark' | 'white';
onScroll?: (rowVisibleStartIdx: number, rowVisibleEndIdx: number) => void;
getNewRowData?: () => R;
/**
Expand Down Expand Up @@ -104,6 +105,7 @@ export default inject('settingStore')(
enableFrozenRow,
searchKey,
settingStore,
theme,
getNewRowData,
onRowsChange,
onScroll,
Expand Down Expand Up @@ -280,7 +282,7 @@ export default inject('settingStore')(

return (
<DataGrid
theme={settingStore.theme.sheetTheme as any}
theme={theme || (settingStore.theme.sheetTheme as any)}
style={{
height: minHeight,
}}
Expand Down
4 changes: 3 additions & 1 deletion src/page/Workspace/components/RecycleBinPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ interface IProps {
datasourceId: number;
showDatasource?: boolean;
simpleHeader?: boolean;
theme?: 'dark' | 'white';
}

class RecycleBin extends Component<
Expand Down Expand Up @@ -301,7 +302,7 @@ class RecycleBin extends Component<
recycleConfig,
} = this.state;

const { simpleHeader } = this.props;
const { simpleHeader, theme } = this.props;

const columns: ColumnsType<IRecycleObject> = [
{
Expand Down Expand Up @@ -568,6 +569,7 @@ class RecycleBin extends Component<
columns={columnsInRestoreDrawer}
rowKey="uniqueId"
rows={selectedObjects as any}
theme={theme}
onRowsChange={this.handleEditPropertyInCell}
/>

Expand Down

0 comments on commit 452f03b

Please sign in to comment.