next-helios-fe 1.8.21 → 1.8.23

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.8.21",
3
+ "version": "1.8.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,6 +36,10 @@ export const Tab: TabComponent = ({
36
36
  const [activeTab, setActiveTab] = useState(0);
37
37
 
38
38
  useEffect(() => {
39
+ if (tabs.length === 1) {
40
+ setActiveTab(0);
41
+ }
42
+
39
43
  if (onChangeTab) {
40
44
  onChangeTab({
41
45
  index: activeTab,
@@ -118,11 +118,15 @@ export const Date: React.FC<DateProps> = ({
118
118
  dateRangeLabel(tempValue) === "Custom" ||
119
119
  !options?.enableSelectRange
120
120
  ? `${
121
- dayjs(tempValue[0]).format("MMM YYYY") ===
122
- dayjs(tempValue[1]).format("MMM YYYY")
123
- ? dayjs(tempValue[0]).format("DD")
124
- : dayjs(tempValue[0]).format("DD MMM YYYY")
125
- } - ${dayjs(tempValue[1]).format("DD MMM YYYY")}`
121
+ !options?.enableSelectRange
122
+ ? ""
123
+ : `${
124
+ dayjs(tempValue[0]).format("MMM YYYY") ===
125
+ dayjs(tempValue[1]).format("MMM YYYY")
126
+ ? dayjs(tempValue[0]).format("DD")
127
+ : dayjs(tempValue[0]).format("DD MMM YYYY")
128
+ } - `
129
+ }${dayjs(tempValue[1]).format("DD MMM YYYY")}`
126
130
  : dateRangeLabel(tempValue)
127
131
  }
128
132
  />