Closed philippfromme closed 8 months ago
@nikku I adjusted the implementation as suggested. The search is now passed to the callback, which returns the custom node.
:upside_down_face: How looks did out? Did you complete fine tuning this PR?
🙃 How looks did out? Did you complete fine tuning this PR?
Unfortunately, I got stuck due to failing tests on Linux & Firefox. They are extremely flaky so I replaced whenStable
with @testing-library/waitFor
(which we are using in the properties panel, too) and increased the timeouts.
@nikku Should be ready to be reviewed now. What a pain in the 🍑 that was.
@philippfromme As discussed I went forth and do a little bit more work on this PR:
getEmptyPlaceholder
hook to be used for integration. Open element documentation
.Please checkout what I did and see if it makes sense.
Looks good to me. @nikku I requested another review so feel free to approve and merge.
Adds
getEmptyPlaceholder
API toPopupMenuProvider
to customize what's shown when there are no entries (after search). Based on the original issue is clear that a simple string or even an HTML string as it's used for icons (imgHtml
) won't cut it here which means we have to allow users to return aVNode
. The search is passed to the callback returning theVNode
so it can be taken into account.Example
Closes https://github.com/bpmn-io/diagram-js/issues/846