INNER CODE UNIT · JavaScript

calcTableWidth

ongres/stackgres · stackgres-k8s/src/admin-ui/src/main.js:37

      const calcTableWidth = () => {
          let tableWidth = 0;
          let width = 0;

          ths.forEach((th) => {
              if (th.style.width) {
                  width = Number(parseInt(th.style.width));
              } else {
                  width = th.offsetWidth;
              }
              tableWidth += width;
          }, 0);

          return tableWidth;
      };
      const applyTableWidth = () => {
          if (opt.fixedWidthTable) {
              table.style.width = calcTableWidth();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…