@omniumretail/component-library 1.2.32 → 1.2.34
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
|
@@ -398,6 +398,7 @@ export const CategoryResponse = React.forwardRef((props: CategoryResponse, ref)
|
|
|
398
398
|
beforeUpload={() => false} // Prevent automatic upload
|
|
399
399
|
onChange={({ fileList }) => handleFileChange(fileList, selectedCategory.Data.CategoryId, question.Id)}
|
|
400
400
|
onPreview={onPreview}
|
|
401
|
+
className={styles.uploadFiles}
|
|
401
402
|
>
|
|
402
403
|
<div className={styles.uploadIconContainer}>
|
|
403
404
|
<PictureOutlined className={styles.iconStyle} />
|
|
@@ -15,14 +15,9 @@ const Template: Story<TagProps> = (args) => {
|
|
|
15
15
|
const advancedsFilters = [{ display: t('components.tag.State'), value: "State" }, { display: t('components.tag.1'), value: "Olaaaaaa" }];
|
|
16
16
|
const [switchTest, setSwitchTest] = useState<boolean>(false);
|
|
17
17
|
|
|
18
|
-
console.log('page: basic', tagsInfo, 'advanced', advancedTagsInfo);
|
|
19
|
-
|
|
20
18
|
return <TagField
|
|
21
19
|
disable={false}
|
|
22
20
|
{...args}
|
|
23
|
-
defaultAdvancedFilters={[
|
|
24
|
-
{ display: `${t('components.tag.State')}=xpto`, value: "State=xpto" },
|
|
25
|
-
]}
|
|
26
21
|
setInactiveUsersSwitch={setSwitchTest}
|
|
27
22
|
advancedTags={advancedsFilters}
|
|
28
23
|
tagsInfo={setTagsInfo}
|
|
@@ -19,10 +19,11 @@ export interface customTagProps extends TagProps {
|
|
|
19
19
|
setInactiveUsersSwitch?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
20
|
hideAdvancedFilters?: boolean;
|
|
21
21
|
defaultAdvancedFilters?: { display: string; value: string }[];
|
|
22
|
+
inputPlacehold?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export const TagField = (props: customTagProps) => {
|
|
25
|
-
const { customTags = [], advancedTags, disable, defaultAdvancedFilters = [], hideAdvancedFilters = false } = props;
|
|
26
|
+
const { customTags = [], advancedTags, disable, defaultAdvancedFilters = [], hideAdvancedFilters = false, inputPlacehold } = props;
|
|
26
27
|
|
|
27
28
|
const [tags, setTags] = useState<string[]>(customTags.filter(tag => !tag.includes('=')));
|
|
28
29
|
const [inputVisible, setInputVisible] = useState<boolean>(false);
|
|
@@ -197,7 +198,8 @@ export const TagField = (props: customTagProps) => {
|
|
|
197
198
|
{inputVisible && (
|
|
198
199
|
<Input
|
|
199
200
|
ref={inputRef}
|
|
200
|
-
type="
|
|
201
|
+
type="search"
|
|
202
|
+
enterKeyHint='done'
|
|
201
203
|
size="small"
|
|
202
204
|
value={inputValue}
|
|
203
205
|
onChange={handleInputChange}
|
|
@@ -219,7 +221,11 @@ export const TagField = (props: customTagProps) => {
|
|
|
219
221
|
|
|
220
222
|
{!inputVisible && (
|
|
221
223
|
<Tag onClick={showInput} className={classNames(styles['tagfield__creator'], 'site-tag-plus')}>
|
|
222
|
-
|
|
224
|
+
{inputPlacehold ? inputPlacehold : (
|
|
225
|
+
<>
|
|
226
|
+
<SearchOutlined /> {t('components.tag.search')}
|
|
227
|
+
</>
|
|
228
|
+
)}
|
|
223
229
|
|
|
224
230
|
{hideAdvancedFilters && (
|
|
225
231
|
showAdvancedFilters ? (
|