i need to add JS for onClick event to a field in listview for v 8.9 latest release.
so that when a user clicks in that column’s cells, some action is triggered. let’s say it shows an alert.
in v7 we used to add customCode in metadata.
i know for v8, i have to build a frontend angular extension. i am using defaultExt as a starting point.
it looks to me that overriding the component.html at the path below will achieve the purpose. core\app\core\src\lib\fields\text\templates\list
but i cannot figure out how to make it override the default component.html and make the one in my extension folder be the working one.
any help will be greatly appreciated.
Very hard to custom similiar in v7 
@hraheem,
there are at least 3 ways to do this:
-
The easy “cheats” way - download the development version , edit the files and compile (not upgrade safe).
-
@BastianHammer I think it was had success creating a new route and changing it that way.
-
I think (note i haven’t tested this) the key is the selector option. in a dev version of Suite create your own module (for the list view) with the SAME selector in the component, take a copy of the html file and modify it. you then compile that and copy the /extensions/defaultExt/public folder to your live version (once it all works) and run a ./bin/console cache:clear. be aware this is not the full solution there is a registration process as well (the extension.module.ts file has something like this in it: fieldRegistry.register(‘default’, ‘bdbc-map-iframe’, ‘list’, BDBCMapIframeEditFieldComponent); )
Regards
Mark