@plastic-js/tsumiki 0.1.65 → 0.1.67

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.
@@ -281,7 +281,8 @@ var DatePicker = (props = {}) => {
281
281
  size: "md",
282
282
  disabled: false,
283
283
  intent: "default",
284
- invalid: false
284
+ invalid: false,
285
+ closeOnBackdrop: false
285
286
  }, props), [
286
287
  "value",
287
288
  "onValueChange",
@@ -290,7 +291,8 @@ var DatePicker = (props = {}) => {
290
291
  "size",
291
292
  "intent",
292
293
  "invalid",
293
- "className"
294
+ "className",
295
+ "closeOnBackdrop"
294
296
  ]);
295
297
  const open = createSignal(false);
296
298
  const resolveValue = () => {
@@ -396,7 +398,7 @@ var DatePicker = (props = {}) => {
396
398
  const _el22 = _el21.firstChild;
397
399
  const _el23 = _el21.firstChild.nextSibling;
398
400
  setProp(_el1, "className", () => backdropClass);
399
- setProp(_el1, "onClick", () => cancel);
401
+ setProp(_el1, "onClick", () => read(local.closeOnBackdrop) ? cancel : void 0);
400
402
  setProp(_el4, "className", () => toolbarBtnClass);
401
403
  setProp(_el4, "onClick", () => cancel);
402
404
  setProp(_el5, "className", () => toolbarTitleClass);
@@ -361,11 +361,20 @@ var Item = (props) => {
361
361
  };
362
362
  var List = () => {
363
363
  const ctx = useSelect();
364
+ const heldHeight = createSignal(0);
365
+ const holdRef = (el) => {
366
+ if (!el || !ctx.filter || heldHeight()) return;
367
+ requestAnimationFrame(() => {
368
+ if (el && !heldHeight()) heldHeight(el.clientHeight);
369
+ });
370
+ };
364
371
  const handleFilterClear = () => {
365
372
  ctx.query("");
366
373
  };
367
374
  return jsx("div", mergeProps(() => part("list"), {
375
+ ref: holdRef,
368
376
  className: listClass,
377
+ style: () => heldHeight() ? { minHeight: `${heldHeight()}px` } : void 0,
369
378
  children: [() => ctx.filter && (() => {
370
379
  const _el0 = _tmpl.cloneNode(true);
371
380
  const _el1 = _el0.firstChild;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plastic-js/tsumiki",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "description": "A UI component library for Plastic JS.",
5
5
  "license": "MIT",
6
6
  "author": "tigre",