classcard-ui 0.2.430 → 0.2.433

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.430",
3
+ "version": "0.2.433",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -78,17 +78,6 @@ export default {
78
78
  };
79
79
  },
80
80
  methods: {
81
- scrollIfNeeded(element, container) {
82
- if (element.offsetTop < container.scrollTop) {
83
- container.scrollTop = element.offsetTop;
84
- } else {
85
- const offsetBottom = element.offsetTop + element.offsetHeight;
86
- const scrollBottom = container.scrollTop + container.offsetHeight;
87
- if (offsetBottom > scrollBottom) {
88
- container.scrollTop = offsetBottom - container.offsetHeight;
89
- }
90
- }
91
- },
92
81
  switchTab(name) {
93
82
  this.activeTab = name;
94
83
  // document.getElementById(`${name}`).scrollIntoView({
@@ -97,10 +86,9 @@ export default {
97
86
  // inline: "start",
98
87
  // });
99
88
 
100
- this.scrollIfNeeded(
101
- document.getElementById(`${name}`),
102
- document.getElementById("container")
103
- );
89
+ let myElement = document.getElementById(name);
90
+ let topPos = myElement.offsetTop;
91
+ document.getElementById("container").scrollTop = topPos;
104
92
  },
105
93
  switchTabForMobile(index) {
106
94
  var selectedOption = this.tabs[index];
@@ -96,7 +96,7 @@
96
96
  :styleClass="
97
97
  showLoader ? 'vgt-table opacity-50 pointer-events-none' : 'vgt-table'
98
98
  "
99
- row-style-class="focus:outline-none"
99
+ :row-style-class="rowStyleClassFn"
100
100
  min-height="400px"
101
101
  :globalSearch="true"
102
102
  :isLoading="showLoader"
@@ -350,6 +350,11 @@ export default {
350
350
  handleToggle() {
351
351
  this.toggleDropdown = !this.toggleDropdown;
352
352
  },
353
+ rowStyleClassFn(row) {
354
+ return row.is_read === 0
355
+ ? "focus:outline-none bg-gray-100"
356
+ : "focus:outline-none";
357
+ },
353
358
  showHideColumn(value, name) {
354
359
  this.$emit("hideCols", value, name);
355
360
  },