@discuss-ds/ui 0.21.0 → 0.22.0
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @discuss-ds/ui
|
|
2
2
|
|
|
3
|
+
## 0.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#86](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/86) [`33207c1`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/33207c1d978d213ad8c430ecc70be4583996df24) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `InlineEdit`: new optional `submitOnEnter` prop for `multiline` fields. Enter saves the edit (a refused edit stays open and focused with its message) and Shift+Enter inserts a line break; Cmd/Ctrl+Enter keeps saving. Off by default, so multiline fields behave as before unless it is set.
|
|
8
|
+
|
|
3
9
|
## 0.21.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1561,6 +1561,7 @@ var InlineEdit = React24.forwardRef(
|
|
|
1561
1561
|
minLength,
|
|
1562
1562
|
validate,
|
|
1563
1563
|
showLimits,
|
|
1564
|
+
submitOnEnter,
|
|
1564
1565
|
disabled,
|
|
1565
1566
|
onEditingChange,
|
|
1566
1567
|
onDraftChange,
|
|
@@ -1654,7 +1655,7 @@ var InlineEdit = React24.forwardRef(
|
|
|
1654
1655
|
cancelled.current = true;
|
|
1655
1656
|
setError(null);
|
|
1656
1657
|
finish(false, true);
|
|
1657
|
-
} else if (event.key === "Enter" && (!multiline || event.metaKey || event.ctrlKey || question && !event.shiftKey)) {
|
|
1658
|
+
} else if (event.key === "Enter" && (!multiline || event.metaKey || event.ctrlKey || (question || submitOnEnter) && !event.shiftKey)) {
|
|
1658
1659
|
event.preventDefault();
|
|
1659
1660
|
finish(true, true);
|
|
1660
1661
|
}
|