@homebound/beam 4.55.0 → 4.55.1
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.cjs +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20428,6 +20428,7 @@ function useMenuSelectField(props) {
|
|
|
20428
20428
|
getOptionLabel = defaultOptionLabel,
|
|
20429
20429
|
getOptionMenuLabel,
|
|
20430
20430
|
getOptionSearchText,
|
|
20431
|
+
autoSort = true,
|
|
20431
20432
|
onSearch,
|
|
20432
20433
|
disabledOptions,
|
|
20433
20434
|
nothingSelectedText = "",
|
|
@@ -20470,10 +20471,10 @@ function useMenuSelectField(props) {
|
|
|
20470
20471
|
const [optionsLoading, setOptionsLoading] = (0, import_react85.useState)(false);
|
|
20471
20472
|
const didRequestOptionsRef = (0, import_react85.useRef)(false);
|
|
20472
20473
|
const options = (0, import_react85.useMemo)(
|
|
20473
|
-
() => initializeOptions(optionsProp, getOptionValue, getOptionLabel, void 0,
|
|
20474
|
+
() => initializeOptions(optionsProp, getOptionValue, getOptionLabel, void 0, autoSort),
|
|
20474
20475
|
// getOptionValue and getOptionLabel are typically inline lambdas
|
|
20475
20476
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
20476
|
-
[optionsProp]
|
|
20477
|
+
[optionsProp, autoSort]
|
|
20477
20478
|
);
|
|
20478
20479
|
const { hoverProps, isHovered } = (0, import_react_aria37.useHover)({});
|
|
20479
20480
|
const { focusProps, isFocusVisible } = (0, import_react_aria37.useFocusRing)();
|
|
@@ -22333,11 +22334,12 @@ var import_mobx_react11 = require("mobx-react");
|
|
|
22333
22334
|
// src/inputs/MenuSelectField/MenuTreeSelectField.tsx
|
|
22334
22335
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
22335
22336
|
function MenuTreeSelectField(props) {
|
|
22336
|
-
const { onSelect, selectionDisplay = "all", defaultExpanded = false, ...rest } = props;
|
|
22337
|
+
const { onSelect, selectionDisplay = "all", defaultExpanded = false, autoSort = false, ...rest } = props;
|
|
22337
22338
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
22338
22339
|
BaseMenuSelectField,
|
|
22339
22340
|
{
|
|
22340
22341
|
...rest,
|
|
22342
|
+
autoSort,
|
|
22341
22343
|
selectionMode: "multiple",
|
|
22342
22344
|
tree: { getChildren: getNestedChildren, display: selectionDisplay, defaultExpanded },
|
|
22343
22345
|
onCommit: (values, opts) => onSelect(treeSelectResponse(values, opts))
|
|
@@ -32009,14 +32011,19 @@ var SingleFilter = class extends BaseFilter {
|
|
|
32009
32011
|
return resolveOptionSelectedFilterLabel(options, getOptionValue, getOptionLabel, value);
|
|
32010
32012
|
}
|
|
32011
32013
|
render(value, setValue, tid, inModal, vertical) {
|
|
32012
|
-
const { label, defaultValue, options: maybeOptions, nothingSelectedText, ...props } = this.props;
|
|
32014
|
+
const { label, defaultValue, options: maybeOptions, nothingSelectedText, autoSort, ...props } = this.props;
|
|
32013
32015
|
const { getOptionValue, getOptionLabel } = optionReaders2(this.props);
|
|
32014
32016
|
const unsetText = nothingSelectedText ?? "All";
|
|
32015
|
-
const
|
|
32017
|
+
const isStaticList = Array.isArray(maybeOptions);
|
|
32018
|
+
const options = isStaticList ? [
|
|
32019
|
+
allOption,
|
|
32020
|
+
...initializeOptions(maybeOptions, getOptionValue, getOptionLabel, void 0, autoSort ?? true)
|
|
32021
|
+
] : maybeOptions;
|
|
32016
32022
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
32017
32023
|
MenuSelectField,
|
|
32018
32024
|
{
|
|
32019
32025
|
...props,
|
|
32026
|
+
autoSort: isStaticList ? false : autoSort,
|
|
32020
32027
|
options,
|
|
32021
32028
|
getOptionValue: (option) => option === allOption ? void 0 : getOptionValue(option),
|
|
32022
32029
|
getOptionLabel: (option) => option === allOption ? unsetText : getOptionLabel(option),
|