@iota-uz/sdk 0.4.30 → 0.4.31
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/dist/bichat/index.d.cts
CHANGED
|
@@ -321,7 +321,7 @@ interface QuestionOption {
|
|
|
321
321
|
interface QuestionAnswerData {
|
|
322
322
|
/** Selected predefined options (option IDs) */
|
|
323
323
|
options: string[];
|
|
324
|
-
/** Custom text entered
|
|
324
|
+
/** Custom text entered for an "Other" answer; mutually exclusive with options */
|
|
325
325
|
customText?: string;
|
|
326
326
|
}
|
|
327
327
|
/**
|
package/dist/bichat/index.d.ts
CHANGED
|
@@ -321,7 +321,7 @@ interface QuestionOption {
|
|
|
321
321
|
interface QuestionAnswerData {
|
|
322
322
|
/** Selected predefined options (option IDs) */
|
|
323
323
|
options: string[];
|
|
324
|
-
/** Custom text entered
|
|
324
|
+
/** Custom text entered for an "Other" answer; mutually exclusive with options */
|
|
325
325
|
customText?: string;
|
|
326
326
|
}
|
|
327
327
|
/**
|
package/dist/bichat/index.mjs
CHANGED
|
@@ -16093,17 +16093,18 @@ function QuestionStep({
|
|
|
16093
16093
|
setOtherText(data.customText || "");
|
|
16094
16094
|
}, [question.id]);
|
|
16095
16095
|
const handleOptionClick = (optionID) => {
|
|
16096
|
+
setOtherText("");
|
|
16096
16097
|
if (isMultiSelect) {
|
|
16097
16098
|
const newOptions = selectedOptions.includes(optionID) ? selectedOptions.filter((a) => a !== optionID) : [...selectedOptions, optionID];
|
|
16098
|
-
onAnswer({ options: newOptions, customText:
|
|
16099
|
+
onAnswer({ options: newOptions, customText: void 0 });
|
|
16099
16100
|
} else {
|
|
16100
|
-
onAnswer({ options: [optionID], customText:
|
|
16101
|
+
onAnswer({ options: [optionID], customText: void 0 });
|
|
16101
16102
|
}
|
|
16102
16103
|
};
|
|
16103
16104
|
const handleOtherTextChange = (text) => {
|
|
16104
16105
|
setOtherText(text);
|
|
16105
16106
|
onAnswer({
|
|
16106
|
-
options:
|
|
16107
|
+
options: [],
|
|
16107
16108
|
customText: text || void 0
|
|
16108
16109
|
});
|
|
16109
16110
|
};
|