mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: time field operator set to between in filter form, component didn't change to time range picker (#6170)
This commit is contained in:
parent
ab6b43745f
commit
474c0421c6
@ -55,9 +55,9 @@ export const FilterCollectionFieldInternalField: React.FC = (props: Props) => {
|
||||
const { uiSchema: uiSchemaOrigin, defaultValue, interface: collectionInterface } = useCollectionField();
|
||||
const { isAllowToSetDefaultValue } = useIsAllowToSetDefaultValue();
|
||||
const targetInterface = getInterface(collectionInterface);
|
||||
const operator = targetInterface?.filterable?.operators?.find(
|
||||
(v, index) => v.value === fieldSchema['x-filter-operator'] || index === 0,
|
||||
);
|
||||
const operator =
|
||||
targetInterface?.filterable?.operators?.find((v, index) => v.value === fieldSchema?.['x-filter-operator']) ||
|
||||
targetInterface?.filterable?.operators?.[0];
|
||||
const Component = useComponent(
|
||||
operator?.schema?.['x-component'] ||
|
||||
fieldSchema['x-component-props']?.['component'] ||
|
||||
|
@ -289,7 +289,7 @@ DatePicker.FilterWithPicker = function FilterWithPicker(props: any) {
|
||||
const field: any = useField();
|
||||
const [stateProps, setStateProps] = useState(newProps);
|
||||
return (
|
||||
<Space.Compact>
|
||||
<Space.Compact style={{ width: '100%' }}>
|
||||
<Select
|
||||
// @ts-ignore
|
||||
role="button"
|
||||
|
@ -192,7 +192,6 @@ export const removeNullCondition = (filter, customFlat = flat) => {
|
||||
export const useFilterActionProps = () => {
|
||||
const collection = useCollection();
|
||||
const options = useFilterOptions(collection?.name);
|
||||
console.log(options);
|
||||
const props = useDataBlockProps();
|
||||
return useFilterFieldProps({ options, params: props?.params });
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user