@dtdot/lego 2.0.0-14 → 2.0.0-15
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.
|
@@ -7,12 +7,10 @@ const NestedFormArray = ({ name, index, children }) => {
|
|
|
7
7
|
const safeError = Array.from(Array(Math.max(index + 1, value?.length || 0))).map((_, i) => error?.[i] || {});
|
|
8
8
|
const nestedValue = safeValue[index];
|
|
9
9
|
const nestedErrors = safeError[index];
|
|
10
|
-
console.log('safe', safeValue);
|
|
11
10
|
const onChangeFn = (key, fieldValue) => {
|
|
12
11
|
const newValue = [
|
|
13
12
|
...safeValue.map((item, i) => (i === index ? { ...item, [key]: fieldValue } : item)),
|
|
14
13
|
];
|
|
15
|
-
console.log(newValue);
|
|
16
14
|
onChange && onChange(newValue);
|
|
17
15
|
};
|
|
18
16
|
const contextValue = {
|
|
@@ -14,11 +14,12 @@ export const OptionsContainer = styled.div `
|
|
|
14
14
|
export const Option = styled(motion.div) `
|
|
15
15
|
color: ${(props) => getThemeControlColours(props.theme).font};
|
|
16
16
|
background-color: ${(props) => props.theme.colours.controlBackgroundDisabled};
|
|
17
|
-
height: 36px;
|
|
18
17
|
display: flex;
|
|
19
18
|
align-items: center;
|
|
20
|
-
padding: 0 12px;
|
|
21
19
|
cursor: pointer;
|
|
20
|
+
|
|
21
|
+
min-height: 36px;
|
|
22
|
+
padding: 6px 12px;
|
|
22
23
|
`;
|
|
23
24
|
export const SelectOptions = ({ options, onSelect }) => {
|
|
24
25
|
const theme = useTheme();
|