We have a table component built in LWC. There is a button, on click of which the rows will be sorted based on some logic. All this markup is a part of the table component. This sorting function is also decorated with @api, so that we can execute this function from the parent (wrapper) component.
Now we are looking for a way so that we can override the sort logic that is already built inside the table component, and provide our own custom logic from the parent (wrapper) component. We really don't want to touch the table component.
This is something like the owner of the component has exposed few APIs to the outer world, and we have to implement these methods. Is this possible in LWC?