@griddo/ax 10.2.13 → 10.2.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "10.2.13",
4
+ "version": "10.2.15",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -231,5 +231,5 @@
231
231
  "publishConfig": {
232
232
  "access": "public"
233
233
  },
234
- "gitHead": "f1f00452bac5e4e6342947c1903ced3e2b5a309c"
234
+ "gitHead": "fe963d0fb161a99127e04e47a866f7cd8b44f093"
235
235
  }
@@ -11,10 +11,10 @@ import { IReferenceState, useReference } from "../Context";
11
11
  import * as S from "./style";
12
12
 
13
13
  const ItemList = (props: IProps) => {
14
- const { items, currentSite, handleListDelete } = props;
14
+ const { items, currentSite, handleListDelete, site } = props;
15
15
 
16
16
  const { state, setState, setReorderElements } = useReference();
17
- const { fixed, selectedItems, sourceTitles, fullRelations, site } = state;
17
+ const { fixed, selectedItems, sourceTitles, fullRelations } = state;
18
18
 
19
19
  useEffect(() => {
20
20
  const params = {
@@ -111,6 +111,7 @@ interface IProps {
111
111
  items: number[];
112
112
  currentSite: number | null;
113
113
  handleListDelete(value: string[]): void;
114
+ site?: number;
114
115
  }
115
116
 
116
117
  const mapStateToProps = (state: IRootState) => ({
@@ -193,7 +193,11 @@ const ReferenceField = (props: IReferenceFieldProps) => {
193
193
 
194
194
  const Asterisk = () => (mandatory ? <S.Asterisk>*</S.Asterisk> : <></>);
195
195
 
196
- const dataBlock = isAuto ? <AutoData /> : <ItemList items={value ? value.fixed : []} handleListDelete={handleListDelete} />;
196
+ const dataBlock = isAuto ? (
197
+ <AutoData />
198
+ ) : (
199
+ <ItemList items={value ? value.fixed : []} handleListDelete={handleListDelete} site={value.site} />
200
+ );
197
201
 
198
202
  return (
199
203
  <S.Wrapper data-testid="reference-field-wrapper">