@reltio/components 1.4.1869 → 1.4.1870
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.
|
@@ -78,8 +78,9 @@ var SendMessageArea = function (_a) {
|
|
|
78
78
|
var commentUri = (0, helpers_1.createCommentUri)({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
79
79
|
var defaultCommentState = getDefaultCommentState({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
80
80
|
var _d = getCommentState(uri, commentUri), _e = _d.value, value = _e === void 0 ? defaultCommentState.value : _e, _f = _d.plainTextValue, plainTextValue = _f === void 0 ? defaultCommentState.plainTextValue : _f, _g = _d.mentions, mentions = _g === void 0 ? defaultCommentState.mentions : _g;
|
|
81
|
+
var hasDefaultValue = defaultCommentState.value.trim() !== '';
|
|
81
82
|
var hasValue = value.trim() !== '';
|
|
82
|
-
var shouldShowButtons = focused || hasValue;
|
|
83
|
+
var shouldShowButtons = focused || hasValue || hasDefaultValue;
|
|
83
84
|
var status = comment === null || comment === void 0 ? void 0 : comment.status;
|
|
84
85
|
var clearValue = function () {
|
|
85
86
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
@@ -49,8 +49,9 @@ export var SendMessageArea = function (_a) {
|
|
|
49
49
|
var commentUri = createCommentUri({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
50
50
|
var defaultCommentState = getDefaultCommentState({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
51
51
|
var _d = getCommentState(uri, commentUri), _e = _d.value, value = _e === void 0 ? defaultCommentState.value : _e, _f = _d.plainTextValue, plainTextValue = _f === void 0 ? defaultCommentState.plainTextValue : _f, _g = _d.mentions, mentions = _g === void 0 ? defaultCommentState.mentions : _g;
|
|
52
|
+
var hasDefaultValue = defaultCommentState.value.trim() !== '';
|
|
52
53
|
var hasValue = value.trim() !== '';
|
|
53
|
-
var shouldShowButtons = focused || hasValue;
|
|
54
|
+
var shouldShowButtons = focused || hasValue || hasDefaultValue;
|
|
54
55
|
var status = comment === null || comment === void 0 ? void 0 : comment.status;
|
|
55
56
|
var clearValue = function () {
|
|
56
57
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|