ketekny-ui-kit 1.0.36 → 1.0.37
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 +1 -1
- package/src/ui/kDatatable.vue +11 -1
package/package.json
CHANGED
package/src/ui/kDatatable.vue
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
:disabled="disabled || !isItemSelectable(slotItem)"
|
|
44
44
|
:title="!isItemSelectable(slotItem) ? 'Row is not selectable' : ''"
|
|
45
45
|
@mousedown="captureSelectionInteraction"
|
|
46
|
-
@click.stop
|
|
46
|
+
@click.stop
|
|
47
47
|
@change="($event) => handleItemSelectionChange($event, slotItem)"
|
|
48
48
|
/>
|
|
49
49
|
</div>
|
|
@@ -191,6 +191,16 @@ export default {
|
|
|
191
191
|
methods: {
|
|
192
192
|
captureSelectionInteraction(event) {
|
|
193
193
|
this.pendingShiftSelection = Boolean(event?.shiftKey || this.isShiftKeyPressed);
|
|
194
|
+
if (event?.type === "mousedown" && event?.shiftKey && typeof event.preventDefault === "function") {
|
|
195
|
+
// Prevent browser range-text selection while using Shift+click for row-range selection.
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
}
|
|
198
|
+
if (typeof window !== "undefined" && typeof window.getSelection === "function") {
|
|
199
|
+
const selection = window.getSelection();
|
|
200
|
+
if (selection && typeof selection.removeAllRanges === "function") {
|
|
201
|
+
selection.removeAllRanges();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
194
204
|
},
|
|
195
205
|
handleWindowKeydown(event) {
|
|
196
206
|
if (event?.key === "Shift") {
|