From 41f238d12b55164e5e3b0c590d19dc2bf30721dd Mon Sep 17 00:00:00 2001 From: Thulasizwe Nkambule Date: Mon, 7 Apr 2025 10:15:41 +0200 Subject: [PATCH 1/8] fix: consistent border --- .../src/components/entityPicker/index.tsx | 47 ++++-- .../src/components/entityPicker/models.ts | 3 + .../components/entityPicker/styles/styles.ts | 1 + .../table/columnsEditor/columnSettings.ts | 14 +- .../entityPicker/index.tsx | 8 +- .../entityPicker/settingsForm.ts | 145 ++++++++---------- .../designer-components/entityPicker/utils.ts | 2 +- 7 files changed, 114 insertions(+), 106 deletions(-) diff --git a/shesha-reactjs/src/components/entityPicker/index.tsx b/shesha-reactjs/src/components/entityPicker/index.tsx index eb75cb27f6..d4599dd45b 100644 --- a/shesha-reactjs/src/components/entityPicker/index.tsx +++ b/shesha-reactjs/src/components/entityPicker/index.tsx @@ -63,7 +63,9 @@ const EntityPickerEditable = (props: IEntityPickerProps) => { outcomeValueFunc, incomeValueFunc, placeholder, - hideBorder + dividerWidth = '1px', + dividerStyle = 'solid', + dividerColor = '#d9d9d9' } = props; if (!entityType) @@ -147,10 +149,8 @@ const EntityPickerEditable = (props: IEntityPickerProps) => { if (onChange) onChange(null, null); }; - const { background, backgroundImage, borderRadius, borderWidth, borderTopWidth, width, minWidth, maxWidth, - borderBottomWidth, borderRightColor, borderRightStyle, borderColor, borderBottomLeftRadius, - borderTopLeftRadius, MozBorderTopColors, borderTopStyle, borderTopColor, borderTop, boxShadow, - borderBottom, borderBottomColor, borderBottomStyle, borderRight, borderRightWidth, ...restStyle } = style; + const { borderBottomLeftRadius, + borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, width, minWidth, maxWidth, boxShadow, background, backgroundImage, marginTop, marginRight, marginBottom, marginLeft, paddingTop, paddingRight, paddingBottom, paddingLeft, ...restStyle } = style; const borderRadii = style?.borderRadius?.toString().split(' '); @@ -164,17 +164,20 @@ const EntityPickerEditable = (props: IEntityPickerProps) => { fontSize: Number(style?.fontSize ?? 14), colorText: style?.color, fontFamily: style?.fontFamily, - fontWeightStrong: Number(style.fontWeight) + fontWeightStrong: Number(style.fontWeight), + multipleItemBg: 'rgba(0,0,0,0.06)' }, }, }} > {useButtonPicker ? ( - ) : ( - + { - selectRef.current.blur(); - showPickerDialog(); - }} - onClear={onClear} - value={selection.loading ? undefined : valueId} - placeholder={selection.loading ? 'Loading...' : placeholder} - notFoundContent={''} - defaultValue={defaultValue} - disabled={disabled || selection.loading} - ref={selectRef} - allowClear - mode={selectedMode} - options={options} - variant='borderless' - suffixIcon={null} - onChange={handleMultiChange} - className={styles.entitySelect} - style={{ - ...restStyle, - borderRight: 'none', - marginTop: 0, - marginRight: 0, marginBottom: 0, marginLeft: 0, paddingTop, paddingRight, paddingBottom, paddingLeft, - borderTopRightRadius: 0, borderBottomRightRadius: 0, - borderTopLeftRadius, - borderBottomLeftRadius - }} - loading={selection.loading} - > - {''} - - + ) : ( + + +