Skip to content

Commit 1e51e61

Browse files
committed
Dropzone fixes
1 parent e887ae1 commit 1e51e61

4 files changed

Lines changed: 17 additions & 20 deletions

File tree

packages/cx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cx",
3-
"version": "26.1.5",
3+
"version": "26.1.6",
44
"description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
55
"exports": {
66
"./data": {

packages/cx/src/jsx-runtime.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,11 @@ describe("jsx-runtime type inference", () => {
439439
it("accepts key prop on widgets", () => {
440440
const widget = (
441441
<cx>
442-
<Sandbox key="field1" />
442+
<Sandbox key={bind("field1")} />
443443
</cx>
444444
);
445445
assert.ok(widget);
446-
assert.equal(widget.key, "field1");
446+
assert.deepEqual(widget.key, { bind: "field1", defaultValue: undefined });
447447
});
448448

449449
it("accepts key prop on intrinsic elements", () => {

packages/cx/src/widgets/drag-drop/DropZone.scss

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
@use "sass:map";
22

3-
@mixin cx-dropzone(
4-
$name: 'dropzone',
5-
$besm: $cx-besm
6-
) {
3+
@mixin cx-dropzone($name: "dropzone", $besm: $cx-besm) {
74
$block: map.get($besm, block);
85
$element: map.get($besm, element);
96
$state: map.get($besm, state);
@@ -39,7 +36,7 @@
3936
}
4037

4138
&.#{$mod}block {
42-
height: 1px;
39+
min-height: 1px;
4340
margin-top: -1px;
4441
align-self: stretch;
4542

@@ -60,7 +57,7 @@
6057
align-self: stretch;
6158

6259
&:after {
63-
content: ' ';
60+
content: " ";
6461
}
6562

6663
&.#{$state}over {
@@ -72,6 +69,6 @@
7269
}
7370
}
7471

75-
@if (cx-should-include('cx/widgets/DropZone')) {
72+
@if (cx-should-include("cx/widgets/DropZone")) {
7673
@include cx-dropzone();
77-
}
74+
}

packages/cx/src/widgets/drag-drop/DropZone.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,35 @@ export interface DropZoneConfig extends StyledContainerConfig {
6363
* instance
6464
Return value is written into dragDropEvent.result and can be passed
6565
to the source's onDragEnd callback. */
66-
onDrop?: string | ((event?: DragEvent, instance?: Instance) => any);
66+
onDrop?: string | ((event: DragEvent, instance: Instance) => any);
6767

6868
/** A callback method used to test if dragged item (source) is compatible
6969
with the drop zone. */
70-
onDropTest?: string | ((event?: DragEvent, instance?: Instance) => boolean);
70+
onDropTest?: string | ((event: DragEvent, instance: Instance) => boolean);
7171

7272
/** A callback method invoked when the dragged item gets close to the drop zone.
7373
See also `nearDistance`. */
74-
onDragNear?: string | ((event?: DragEvent, instance?: Instance) => void);
74+
onDragNear?: string | ((event: DragEvent, instance: Instance) => void);
7575

7676
/** A callback method invoked when the dragged item is dragged away. */
77-
onDragAway?: string | ((event?: DragEvent, instance?: Instance) => void);
77+
onDragAway?: string | ((event: DragEvent, instance: Instance) => void);
7878

7979
/** A callback method invoked when the dragged item is dragged over the drop zone.
8080
The callback is called for each `mousemove` or `touchmove` event. */
81-
onDragOver?: string | ((event?: DragEvent, instance?: Instance) => void);
81+
onDragOver?: string | ((event: DragEvent, instance: Instance) => void);
8282

8383
/** A callback method invoked when the dragged item is dragged over the drop zone
8484
for the first time. */
85-
onDragEnter?: string | ((event?: DragEvent, instance?: Instance) => void);
85+
onDragEnter?: string | ((event: DragEvent, instance: Instance) => void);
8686

8787
/** A callback method invoked when the dragged item leaves the drop zone area. */
88-
onDragLeave?: string | ((event?: DragEvent, instance?: Instance) => void);
88+
onDragLeave?: string | ((event: DragEvent, instance: Instance) => void);
8989

9090
/** A callback method invoked when at the beginning of the drag & drop operation. */
91-
onDragStart?: string | ((event?: DragEvent, instance?: Instance) => void);
91+
onDragStart?: string | ((event: DragEvent, instance: Instance) => void);
9292

9393
/** A callback method invoked when at the end of the drag & drop operation. */
94-
onDragEnd?: string | ((event?: DragEvent, instance?: Instance) => void);
94+
onDragEnd?: string | ((event: DragEvent, instance: Instance) => void);
9595

9696
/** Match height of the item being dragged */
9797
matchHeight?: boolean;

0 commit comments

Comments
 (0)