@omniumretail/component-library 1.2.63 → 1.2.65

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.
@@ -19,5 +19,6 @@ export interface customTagProps extends TagProps {
19
19
  }[];
20
20
  inputPlacehold?: string;
21
21
  inputDefaultAdvancedFilter?: string;
22
+ autoFocus?: boolean;
22
23
  }
23
24
  export declare const TagField: (props: customTagProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/component-library",
3
- "version": "1.2.63",
3
+ "version": "1.2.65",
4
4
  "private": false,
5
5
  "main": "dist/bundle.js",
6
6
  "typings": "./dist/types/index",
@@ -147,7 +147,7 @@ export const CategoryResponse = React.forwardRef((props: CategoryResponse, ref)
147
147
  : null)
148
148
  : question.Answer)
149
149
  : question.Answer
150
- : data.StartDate,
150
+ : question.Answer,
151
151
  Note: question.Note || "",
152
152
  IsMultipleChoise: question.IsMultipleChoise || false,
153
153
  IsNumerical: question.IsNumerical || false,
@@ -21,13 +21,25 @@ export interface customTagProps extends TagProps {
21
21
  defaultAdvancedFilters?: { display: string; value: string }[];
22
22
  inputPlacehold?: string;
23
23
  inputDefaultAdvancedFilter?: string;
24
+ autoFocus?: boolean;
24
25
  }
25
26
 
26
27
  export const TagField = (props: customTagProps) => {
27
- const { customTags = [], advancedTags, disable, defaultAdvancedFilters = [], hideAdvancedFilters = true, inputPlacehold, inputDefaultAdvancedFilter = "" } = props;
28
+ const {
29
+ customTags = [],
30
+ advancedTags,
31
+ disable,
32
+ defaultAdvancedFilters = [],
33
+ hideAdvancedFilters = true,
34
+ inputPlacehold,
35
+ inputDefaultAdvancedFilter = "",
36
+ autoFocus = false
37
+ } = props;
28
38
 
29
39
  const [tags, setTags] = useState<string[]>(customTags.filter(tag => !tag.includes('=')));
30
- const [inputVisible, setInputVisible] = useState<boolean>(inputDefaultAdvancedFilter !== "" ? true : false);
40
+ const [inputVisible, setInputVisible] = useState<boolean>(
41
+ inputDefaultAdvancedFilter !== "" || autoFocus
42
+ );
31
43
  const [inputValue, setInputValue] = useState(
32
44
  inputDefaultAdvancedFilter !== "" ? inputDefaultAdvancedFilter + '=' : ''
33
45
  );