Open hashyaha opened 2 years ago
Thanks for opening a new issue. The author has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/olton/Metro-UI-CSS or Patreon
I observe exactetly the same
I have the same problem with the latest version 4.5.0, but as @hashyaha notes, the previous version works just fine so I can work around the problem for now by including the older version:
<script src="https://cdn.metroui.org.ua/v4.4.3/js/metro.min.js"></script>
To correct this issue, you need to add an array to the data after the line 34696
var data, stored_keys; data = [];
Thanks a lot
I have the same problem in v4.5.1 but cannot downgrade because I just upgraded to get the fix for another bug. Something in metro.min.js is throwing an undefined error...
TypeError: undefined is not an object (evaluating 'e.indexOf')
The error is coming from this code block in metro.min.js:
t.on(b.events.click, ".table-service-check-all input", function() {
var e,
t,
n = w(this).is(":checked"),
i = r.checkStoreKey.replace("$1", c),
s = b.storage;
!0 === r.useCurrentSlice ? (t = s.getItem(i, []), n ? w.each(o.currentSlice, function() {
-1 === t.indexOf("" + this[r.checkColIndex]) && t.push("" + this[r.checkColIndex])
}) : w.each(o.currentSlice, function() {
var e = "" + this[r.checkColIndex];
-1 !== t.indexOf(e) && b.utils.arrayDelete(t, e)
}), e = t) : n ? w.each(o.filteredItems, function() {
-1 === e.indexOf(this[r.checkColIndex]) && e.push("" + this[r.checkColIndex]) //this line
}) : e = [],
s.setItem(i, e),
o._draw(),
o._fireEvent("check-click-all", {
check: this,
status: n,
data: e
})
});
Describe the bug I follow the code from this video to create a sidebar in Google Sheets. It uses Google App Script and also Metro UI table component. After the sidebar loads, I couldn't select all rows. There is no issue if I change to earlier version of metro ui (v4.4.3)
To Reproduce The html code (sidebar.html)
The javascript code:
Expected behavior When select all is clicked, all of the checkboxes should be selected.
Screenshots This is what happens when v4 was chosen in the html![image](https://user-images.githubusercontent.com/70197006/131350672-06124dd8-046e-476c-b5c0-c9add255d10d.png)
This is what it is supposed to be. (using v4.4.3)![image](https://user-images.githubusercontent.com/70197006/131351229-f07aaaa8-ea66-49ee-a539-30bfa6ccd353.png)
Desktop (please complete the following information):
Additional context