nexaas-ui-components 1.0.101 → 1.0.102
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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2221,7 +2221,8 @@ var FilterSelect = ({
|
|
|
2221
2221
|
cancelLabel = "Cancelar",
|
|
2222
2222
|
clearLabel = "Limpar",
|
|
2223
2223
|
selectAllLabel = "Marcar todos",
|
|
2224
|
-
clearButton = true
|
|
2224
|
+
clearButton = true,
|
|
2225
|
+
preloadOptions = false
|
|
2225
2226
|
}) => {
|
|
2226
2227
|
const [currentValue, setCurrentValue] = React6.useState(isMulti ? [] : {});
|
|
2227
2228
|
const [data, setData] = React6.useState(() => options);
|
|
@@ -2231,7 +2232,7 @@ var FilterSelect = ({
|
|
|
2231
2232
|
);
|
|
2232
2233
|
const [loading, setLoading] = React6.useState(false);
|
|
2233
2234
|
const search = async () => {
|
|
2234
|
-
if ((filter == null ? void 0 : filter.length) > 0 || (options == null ? void 0 : options.length) > 0) {
|
|
2235
|
+
if (preloadOptions || (filter == null ? void 0 : filter.length) > 0 || (options == null ? void 0 : options.length) > 0) {
|
|
2235
2236
|
if (fetch) {
|
|
2236
2237
|
setData(await fetch(filter, subFilter));
|
|
2237
2238
|
} else {
|