Hello webix support
How I can extend any component to include data-local-id attrbute in DOM ?
That would be of course exactly same value which would be used in localId config
Hello webix support
How I can extend any component to include data-local-id attrbute in DOM ?
That would be of course exactly same value which would be used in localId config
I know how to do that for e.g. webix.ui.window
webix.ui.window = webix.extend(webix.ui.window, {
$init: function(){
this.attachEvent("onShow", function(){
const node = this.getNode();
if(this.config.localId) {
node.setAttribute("data-local-id", this.config.localId);
}
})
}
});
But then it works only for windows
I would like to have same result for ALL components.
Isnβt that possible if all components are based on webix.ui.view ?
@michald1986
it is possible using this undocumented feature.
put this script as first line in html->head
<script>
window.webix_view = {
$init: function(config){
this.$ready.push(function(){
config.localId &&
this.$view.setAttribute("data-local-id", config.localId);
})
}
}
</script>
That is awesome.
Works exactly like I wanted it to work
Thank you very much !