@apia/components 4.0.80 → 4.0.81

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/dist/index.d.ts CHANGED
@@ -923,7 +923,7 @@ declare class AutocompleteController {
923
923
  selectFocused(): void;
924
924
  setValue(value: string, props?: {
925
925
  fireOnChange?: boolean;
926
- force?: true;
926
+ force?: boolean;
927
927
  }): Promise<void>;
928
928
  tooltipRef: ApiaUtilTooltip | null;
929
929
  }
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ class AccordionHandler {
149
149
  udpateItem(itemId, updater) {
150
150
  const newProps = updater instanceof Function ? updater(this.itemsState[itemId]) : updater;
151
151
  Object.assign(this.itemsState[itemId], newProps);
152
- this.itemsStateListeners[itemId].forEach(
152
+ this.itemsStateListeners?.[itemId]?.forEach(
153
153
  (current) => current(this.itemsState[itemId])
154
154
  );
155
155
  }
@@ -3642,7 +3642,10 @@ const Autocomplete = (props) => {
3642
3642
  if (!shallowEqual$1(prevProps.current, props.properties) && handler?.state) {
3643
3643
  Object.assign(handler.state, props.properties);
3644
3644
  if (prevProps.current?.value !== props.properties?.value && props.properties?.value !== void 0) {
3645
- handler.setValue(props.properties.value, { fireOnChange: false });
3645
+ handler.setValue(props.properties.value, {
3646
+ fireOnChange: false,
3647
+ force: prevProps.current?.value === void 0
3648
+ });
3646
3649
  }
3647
3650
  }
3648
3651
  if (!handler) {
@@ -6330,7 +6333,9 @@ function useListboxAutofocus(storeId, getState) {
6330
6333
  );
6331
6334
  if (focusedRow) {
6332
6335
  const scrollContainer = findScrollContainer(focusedRow);
6336
+ console.log(focusedRow, scrollContainer);
6333
6337
  if (scrollContainer && scrollContainer.classList.contains("listbox")) {
6338
+ console.log("scroll container into view");
6334
6339
  scrollContainer.scrollIntoView({
6335
6340
  behavior: "auto",
6336
6341
  block: "nearest",
@@ -6341,6 +6346,7 @@ function useListboxAutofocus(storeId, getState) {
6341
6346
  if (elRect.top - contRect.top < elRect.height)
6342
6347
  scrollContainer.scrollTop -= elRect.height;
6343
6348
  }
6349
+ console.log("scroll focusedRow into view");
6344
6350
  focusedRow.scrollIntoView({
6345
6351
  behavior: "auto",
6346
6352
  block: "nearest",