@selfcommunity/react-ui 0.10.0-alpha.3 → 0.10.0-alpha.4

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.
@@ -56,7 +56,7 @@ const TagAutocomplete = (inProps) => {
56
56
  const [open, setOpen] = (0, react_1.useState)(false);
57
57
  const [value, setValue] = (0, react_1.useState)(typeof defaultValue === 'string' ? null : defaultValue);
58
58
  // HOOKS
59
- const { scAddressingTags } = (0, react_core_1.useSCFetchAddressingTagList)({ fetch: open });
59
+ const { scAddressingTags } = (0, react_core_1.useSCFetchAddressingTagList)({ fetch: true });
60
60
  (0, react_1.useEffect)(() => {
61
61
  if (value === null) {
62
62
  return;
@@ -67,7 +67,7 @@ const TagAutocomplete = (inProps) => {
67
67
  if (scAddressingTags && typeof defaultValue === 'string') {
68
68
  setValue(scAddressingTags.find((t) => t.id === Number(defaultValue)));
69
69
  }
70
- }, [defaultValue, scAddressingTags]);
70
+ }, [scAddressingTags, defaultValue]);
71
71
  // Handlers
72
72
  const handleOpen = () => {
73
73
  setOpen(true);
@@ -54,7 +54,7 @@ const TagAutocomplete = (inProps) => {
54
54
  const [open, setOpen] = useState(false);
55
55
  const [value, setValue] = useState(typeof defaultValue === 'string' ? null : defaultValue);
56
56
  // HOOKS
57
- const { scAddressingTags } = useSCFetchAddressingTagList({ fetch: open });
57
+ const { scAddressingTags } = useSCFetchAddressingTagList({ fetch: true });
58
58
  useEffect(() => {
59
59
  if (value === null) {
60
60
  return;
@@ -65,7 +65,7 @@ const TagAutocomplete = (inProps) => {
65
65
  if (scAddressingTags && typeof defaultValue === 'string') {
66
66
  setValue(scAddressingTags.find((t) => t.id === Number(defaultValue)));
67
67
  }
68
- }, [defaultValue, scAddressingTags]);
68
+ }, [scAddressingTags, defaultValue]);
69
69
  // Handlers
70
70
  const handleOpen = () => {
71
71
  setOpen(true);