!2253 修复:右侧工具栏材质界面切换详细列表时列宽错误

pull/2232/MERGE
黄诗津 1 year ago committed by ChenX
parent 2c8cf1d028
commit c9afe91b38

@ -24,6 +24,7 @@ export interface IDataListProps
renderOtherElement?: (data) => JSX.Element;
selectData: Set<string>;
showInfos: boolean;
/**右侧工具栏材质的小界面模式,不触发列宽调整*/
isSmaller?: boolean;
dbclickImg?: (data: AnyObject) => void;
dragStart?: (data: AnyObject) => void;
@ -106,8 +107,8 @@ export class DataList extends React.Component<IDataListProps> {
private UpDataColumnWidthEl = async () =>
{
const { idKey, dataList, showInfos } = this.props;
if (dataList.length === 0 || !showInfos) return;
const { idKey, dataList, showInfos, isSmaller } = this.props;
if (dataList.length === 0 || !showInfos || isSmaller) return;
for (const title in this.curColumnWidthEl)
{
this.curColumnWidthEl[title] = Array.from(
@ -146,6 +147,7 @@ export class DataList extends React.Component<IDataListProps> {
private SaveConfig = () =>
{
if (this.props.isSmaller) return;
userConfigStore.SaveConfig(BoardModalType.DatalistStore, datalistStore, { toaster: false, isUploadUserConfigNames: false }); //保存配置
};
renderBigData = () =>
@ -297,6 +299,7 @@ export class DataList extends React.Component<IDataListProps> {
onDragStart={() => this.handleDragStart(data)}
draggable="true"
className="file-title-item title-type-name"
style={isSmaller ? { width: "100%" } : {}}
>
{
isSvg ?

Loading…
Cancel
Save