Hello there,
i am currently in the process of developing an ApEx region plugin based on Oracle Jet charts.
It contains an oj-legend that should be resetted by a button because it has many items.
The filtered items are tracked via Knockout's ObservableArray (pretty standard cookbook stuff: https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=chart&demo=filtering).
So the problem is, the reset button (oj-button) always refreshes the page.
The button is inserted into the DOM by PL/SQL code:
sys.htp.p('<oj-button id="legend_reset_button" type="button" on-oj-action="[[resetButtonClick]]">Reset Filters</oj-button>');
And the JavaScript function behind resetButtonClick is:
// Reset Button sets the hiddenCategoriesValue OA to empty which in turn triggers the onChange eventself.resetButtonClick = function(event){
event.preventDefault(); // does not help
self.hiddenCategoriesValue([]);
return false; // does not help
}
Is it possible to prevent this page refresh (or maybe page submit) from happening?
There must be something I'm missing when configuring the button & event function.
Thanks in advance
René