@omniumretail/component-library 1.2.42 → 1.2.44
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.
|
@@ -9,9 +9,9 @@ export interface MobileTableProps {
|
|
|
9
9
|
translation: string;
|
|
10
10
|
modalVisible: boolean;
|
|
11
11
|
setModalVisible: Dispatch<SetStateAction<boolean>>;
|
|
12
|
-
actions: Action[];
|
|
13
12
|
title: string;
|
|
14
13
|
hasArrows?: boolean;
|
|
14
|
+
actions?: Action[];
|
|
15
15
|
handlePrev?: () => void;
|
|
16
16
|
handleNext?: () => void;
|
|
17
17
|
hiddenColumns?: string[];
|
package/package.json
CHANGED
|
@@ -20,9 +20,9 @@ export interface MobileTableProps {
|
|
|
20
20
|
translation: string;
|
|
21
21
|
modalVisible: boolean;
|
|
22
22
|
setModalVisible: Dispatch<SetStateAction<boolean>>;
|
|
23
|
-
actions: Action[];
|
|
24
23
|
title: string;
|
|
25
24
|
hasArrows?: boolean;
|
|
25
|
+
actions?: Action[];
|
|
26
26
|
handlePrev?: () => void;
|
|
27
27
|
handleNext?: () => void;
|
|
28
28
|
hiddenColumns?: string[];
|
|
@@ -39,7 +39,7 @@ export const MobileTable = (
|
|
|
39
39
|
|
|
40
40
|
const menu = (
|
|
41
41
|
<Menu>
|
|
42
|
-
{actions
|
|
42
|
+
{actions?.map((action, index) => (
|
|
43
43
|
<React.Fragment key={action.key}>
|
|
44
44
|
<Menu.Item key={action.key} onClick={action.onClick}>
|
|
45
45
|
{action.label}
|
|
@@ -47,7 +47,7 @@ export const MobileTable = (
|
|
|
47
47
|
|
|
48
48
|
{index < actions.length - 1 && <Menu.Divider />}
|
|
49
49
|
</React.Fragment>
|
|
50
|
-
))}
|
|
50
|
+
)) || []}
|
|
51
51
|
</Menu>
|
|
52
52
|
);
|
|
53
53
|
|
|
@@ -69,9 +69,12 @@ export const MobileTable = (
|
|
|
69
69
|
/>
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
72
|
+
{actions?.length > 0 &&
|
|
73
|
+
<Dropdown overlay={menu}>
|
|
74
|
+
<Button>{t("tableHeadings.action")}</Button>
|
|
75
|
+
</Dropdown>
|
|
76
|
+
}
|
|
77
|
+
|
|
75
78
|
|
|
76
79
|
{hasArrows &&
|
|
77
80
|
<RightCircleOutlined
|
|
@@ -24,13 +24,13 @@ export interface customTagProps extends TagProps {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export const TagField = (props: customTagProps) => {
|
|
27
|
-
const { customTags = [], advancedTags, disable, defaultAdvancedFilters = [], hideAdvancedFilters =
|
|
27
|
+
const { customTags = [], advancedTags, disable, defaultAdvancedFilters = [], hideAdvancedFilters = true, inputPlacehold, inputDefaultAdvancedFilter = "" } = props;
|
|
28
28
|
|
|
29
29
|
const [tags, setTags] = useState<string[]>(customTags.filter(tag => !tag.includes('=')));
|
|
30
30
|
const [inputVisible, setInputVisible] = useState<boolean>(inputDefaultAdvancedFilter !== "" ? true : false);
|
|
31
31
|
const [inputValue, setInputValue] = useState(
|
|
32
32
|
inputDefaultAdvancedFilter !== "" ? inputDefaultAdvancedFilter + '=' : ''
|
|
33
|
-
);
|
|
33
|
+
);
|
|
34
34
|
const inputRef = useRef<InputRef>(null);
|
|
35
35
|
const [advancedTagList, setAdvancedTagList] = useState<Array<{ display: string; value: string }>>(
|
|
36
36
|
defaultAdvancedFilters
|
|
@@ -39,7 +39,7 @@ export const TagField = (props: customTagProps) => {
|
|
|
39
39
|
...customTags.filter(tag => !tag.includes('=')),
|
|
40
40
|
...defaultAdvancedFilters.map((filter) => `${filter.display}`),
|
|
41
41
|
]);
|
|
42
|
-
const [showAdvancedFilters, setShowAdvancedFilters] = useState<boolean>(false);
|
|
42
|
+
const [showAdvancedFilters, setShowAdvancedFilters] = useState<boolean>(hideAdvancedFilters ? false : true);
|
|
43
43
|
|
|
44
44
|
useEffect(() => {
|
|
45
45
|
if (defaultAdvancedFilters?.length > 0) {
|