I want to display some data list/table rows on the property panel, I think I can use list control to make it happen. But when I implement this control, I have to set component property to the ListEntry control, I have no idea what I can do it correctly. Thanks
import { ListEntry } from '@bpmn-io/properties-panel';
import { useService } from 'bpmn-js-properties-panel';
import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil';
import { forEach } from "min-dash";
export default function (element) {
var performerProperty =
{
id: 'performer',
element,
component: Performer
};
return performerProperty;
}
function Performer(props) {
const { element, id } = props;
const moddle = useService('moddle');
const modeling = useService('modeling');
const translate = useService('translate');
const debounce = useService('debounceInput');
const items = [];
var a = {
"id": "1",
"label": "jack"
}
items.push(a);
const getValue = () => {
;
}
const setValue = value => {
;
}
const onAdd = function () {
var a = {
"id": "2",
"label": "tom"
}
items.push(a);
console.log('on add event...');
console.log(items);
}
return <ListEntry
id={id}
items={items}
element={element}
/* component={new HTMLLabelElement()}*/
label={translate('Role')}
onAdd={onAdd}
open={true}
getValue={getValue}
setValue={setValue}
debounce={debounce}
/>
}
In the below picture, it has displayed that there are 3 items to be shown, but it can’t show it directly, it seemed that the component property should be set to the ListEntry control. Thanks for any suggestions.