mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
Merge pull request #10253 from 2betop/fix-crud-synclocation
chore: crud 即便不同步地址栏也回显地址栏参数 Close: #9788
This commit is contained in:
commit
7e0f3fdfa0
@ -2666,6 +2666,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
footerToolbarRender,
|
||||
testIdBuilder,
|
||||
id,
|
||||
filterCanAccessSuperData = true,
|
||||
...rest
|
||||
} = this.props;
|
||||
|
||||
@ -2702,7 +2703,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
onSubmit: this.handleFilterSubmit,
|
||||
onInit: this.handleFilterInit,
|
||||
formStore: undefined,
|
||||
canAccessSuperData: false
|
||||
canAccessSuperData: filterCanAccessSuperData
|
||||
}
|
||||
)
|
||||
: null}
|
||||
@ -2726,6 +2727,7 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
className: cx('Crud-body', bodyClassName),
|
||||
ref: this.controlRef,
|
||||
autoGenerateFilter: !filter && autoGenerateFilter,
|
||||
filterCanAccessSuperData,
|
||||
autoFillHeight: autoFillHeight,
|
||||
selectable: !!(
|
||||
(this.hasBulkActionsToolbar() && this.hasBulkActions()) ||
|
||||
|
@ -268,6 +268,7 @@ export default class PickerControl extends React.PureComponent<
|
||||
type: 'crud',
|
||||
pickerMode: true,
|
||||
syncLocation: false,
|
||||
filterCanAccessSuperData: false,
|
||||
api: isScopeData ? null : props.source,
|
||||
source: isScopeData ? props.source : null,
|
||||
keepItemSelectionOnPageChange: true,
|
||||
|
@ -19,6 +19,8 @@ export interface AutoFilterFormProps extends RendererProps {
|
||||
onToggleExpanded?: () => void;
|
||||
query?: any;
|
||||
|
||||
canAccessSuperData?: boolean;
|
||||
|
||||
popOverContainer?: any;
|
||||
onSearchableFromReset?: any;
|
||||
onSearchableFromSubmit?: any;
|
||||
@ -40,7 +42,8 @@ export function AutoFilterForm({
|
||||
onSearchableFromSubmit,
|
||||
onSearchableFromInit,
|
||||
popOverContainer,
|
||||
testIdBuilder
|
||||
testIdBuilder,
|
||||
canAccessSuperData
|
||||
}: AutoFilterFormProps) {
|
||||
const schema = React.useMemo(() => {
|
||||
const {columnsNum, showBtnToolbar} =
|
||||
@ -194,13 +197,14 @@ export function AutoFilterForm({
|
||||
submitText: __('search'),
|
||||
body: body,
|
||||
actions: [],
|
||||
canAccessSuperData: false
|
||||
canAccessSuperData: canAccessSuperData
|
||||
};
|
||||
}, [
|
||||
autoGenerateFilter,
|
||||
activedSearchableColumns,
|
||||
searchableColumns,
|
||||
searchFormExpanded,
|
||||
canAccessSuperData,
|
||||
__ // 保证语言更新后能重新渲染
|
||||
]);
|
||||
|
||||
|
@ -1693,7 +1693,8 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
query,
|
||||
data,
|
||||
autoGenerateFilter,
|
||||
testIdBuilder
|
||||
testIdBuilder,
|
||||
filterCanAccessSuperData = true
|
||||
} = this.props;
|
||||
|
||||
const searchableColumns = store.searchableColumns;
|
||||
@ -1708,6 +1709,7 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
translate={__}
|
||||
classnames={cx}
|
||||
render={render}
|
||||
canAccessSuperData={filterCanAccessSuperData}
|
||||
autoGenerateFilter={autoGenerateFilter}
|
||||
onSearchableFromReset={onSearchableFromReset}
|
||||
onSearchableFromSubmit={onSearchableFromSubmit}
|
||||
|
Loading…
Reference in New Issue
Block a user