mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-19 14:37:52 +00:00
Made Fields immutable for Applications (#20799)
* Made dropdown immutable for input field * added tests * removed test
This commit is contained in:
parent
9bd67915b4
commit
72b4ac486d
@ -50,6 +50,7 @@ import {
|
|||||||
elasticsearchToJsonLogic,
|
elasticsearchToJsonLogic,
|
||||||
getJsonTreeFromQueryFilter,
|
getJsonTreeFromQueryFilter,
|
||||||
jsonLogicToElasticsearch,
|
jsonLogicToElasticsearch,
|
||||||
|
READONLY_SETTINGS,
|
||||||
} from '../../../../../../utils/QueryBuilderUtils';
|
} from '../../../../../../utils/QueryBuilderUtils';
|
||||||
import { getExplorePath } from '../../../../../../utils/RouterUtils';
|
import { getExplorePath } from '../../../../../../utils/RouterUtils';
|
||||||
import searchClassBase from '../../../../../../utils/SearchClassBase';
|
import searchClassBase from '../../../../../../utils/SearchClassBase';
|
||||||
@ -268,6 +269,10 @@ const QueryBuilderWidget: FC<WidgetProps> = ({
|
|||||||
<Builder {...props} />
|
<Builder {...props} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
settings={{
|
||||||
|
...config.settings,
|
||||||
|
...(props.readonly ? READONLY_SETTINGS : {}),
|
||||||
|
}}
|
||||||
value={treeInternal}
|
value={treeInternal}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
/>
|
/>
|
||||||
|
@ -50,6 +50,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.query-builder-form-field {
|
.query-builder-form-field {
|
||||||
|
.ant-select-disabled.ant-select:not(.ant-select-customize-input)
|
||||||
|
.ant-select-selector {
|
||||||
|
color: @black;
|
||||||
|
background-color: @background-color;
|
||||||
|
}
|
||||||
.hide--line.one--child {
|
.hide--line.one--child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
|
@ -114,7 +114,14 @@ export const getSelectEqualsNotEqualsProperties = (
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
export const READONLY_SETTINGS = {
|
||||||
|
immutableGroupsMode: true,
|
||||||
|
immutableFieldsMode: true,
|
||||||
|
immutableOpsMode: true,
|
||||||
|
immutableValuesMode: true,
|
||||||
|
canRegroup: false,
|
||||||
|
canRemove: false,
|
||||||
|
};
|
||||||
export const getSelectAnyInProperties = (
|
export const getSelectAnyInProperties = (
|
||||||
parentPath: Array<string>,
|
parentPath: Array<string>,
|
||||||
termObjects: Array<EsTerm>
|
termObjects: Array<EsTerm>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user