@design.estate/dees-catalog 1.0.217 → 1.0.218

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "1.0.217",
3
+ "version": "1.0.218",
4
4
  "private": false,
5
5
  "description": "website for lossless.com",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '1.0.217',
6
+ version: '1.0.218',
7
7
  description: 'website for lossless.com'
8
8
  }
@@ -603,7 +603,8 @@ export class DeesTable<T> extends DeesElement {
603
603
  return actions;
604
604
  }
605
605
 
606
- handleCellEditing(event: Event, itemArg: T, key: string) {
606
+ async handleCellEditing(event: Event, itemArg: T, key: string) {
607
+ const domtools = await this.domtoolsPromise;
607
608
  const target = event.target as HTMLElement;
608
609
  const transformedItem = this.displayFunction(itemArg);
609
610
  const initialValue = (transformedItem[key] as unknown as string) || '';
@@ -612,16 +613,15 @@ export class DeesTable<T> extends DeesElement {
612
613
  input.type = 'text';
613
614
  input.value = initialValue;
614
615
 
615
- const blurInput = (blurArg = true, saveArg = false) => {
616
+ const blurInput = async (blurArg = true, saveArg = false) => {
616
617
  if (blurArg) {
617
618
  input.blur();
618
619
  }
619
620
  if (saveArg) {
620
621
  itemArg[key] = input.value as any; // Convert string to T (you might need better type casting depending on your data structure)
621
- target.innerHTML = input.value; // Update the cell's display
622
- } else {
623
- target.innerHTML = initialValue;
624
622
  }
623
+ input.remove();
624
+ this.requestUpdate();
625
625
  };
626
626
 
627
627
  // When the input loses focus or the Enter key is pressed, update the data
@@ -635,7 +635,6 @@ export class DeesTable<T> extends DeesElement {
635
635
  });
636
636
 
637
637
  // Replace the cell's content with the input
638
- target.innerHTML = '';
639
638
  target.appendChild(input);
640
639
  input.focus();
641
640
  }