Enhance SpotlightTooltip component with model property integration
- Added the getModelProperty function to SpotlightTooltip for improved property handling. - Updated ObjectProperty component to utilize dynamic properties based on the model type, enhancing flexibility in data representation.
This commit is contained in:
parent
8319d3d7b3
commit
084d807c95
@ -8,7 +8,10 @@ import ObjectProperty from './ObjectProperty'
|
||||
import InfoCircleIcon from '../../Icons/InfoCircleIcon'
|
||||
import { ApiServerContext } from '../context/ApiServerContext'
|
||||
import merge from 'lodash/merge'
|
||||
import { getModelByName } from '../../../database/ObjectModels'
|
||||
import {
|
||||
getModelByName,
|
||||
getModelProperty
|
||||
} from '../../../database/ObjectModels'
|
||||
|
||||
const { Text } = Typography
|
||||
|
||||
@ -128,7 +131,7 @@ const SpotlightTooltip = ({ query, type }) => {
|
||||
return (
|
||||
<Descriptions.Item key={prop.name} label={prop.label}>
|
||||
<ObjectProperty
|
||||
type={prop.type}
|
||||
{...getModelProperty(type, prop.name)}
|
||||
value={value}
|
||||
objectData={spotlightData}
|
||||
objectType={prop.objectType || type}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user