Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Table header and Table body is not align after updating from version 2.5.7 to 4.3.1

オープン
#2,113 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
bootstrap, javascript, react
領域
frontend

調査の方向性

src/BootstrapTable.js の 1476 行目付近から始め、_adjustHeaderWidth が isScroll と isVerticalScroll を確認している箇所を見ます。2.5.7 から 4.3.1 へのアップグレード後にヘッダーとボディのずれを再現し、リサイズによってトリガーされる幅の計算を調べ、この条件を古いバージョンと比較します。垂直スクロールがない場合にテーブルのヘッダーとボディが揃ったままになれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hello,

We are using react-bootstrable-table 2.5.7 updating to the latest(4.3.1),

As I dig dipper I look into the library, react-bootstrap-table column width actually computed, and every time the window is resize this will trigger the column width computation

The method is _adjustHeaderWidth, and there is a condition that preventing to compute the width,
https://github.com/AllenFang/react-bootstrap-table/blob/master/src/BootstrapTable.js#L1476
if (isScroll || this.isVerticalScroll !== isScroll) {
but 2.5.7 version without this condition the alignment is fine.

The condition actually is isScroll to check if there is a scroll which is always false(As I check in our case).
tbody.parentNode.getBoundingClientRect().height and
tbody.parentNode.parentNode.getBoundingClientRect().height has the same value

and isVerticalScroll is initialize to false

Please advise.

Thank you!

主要言語
JavaScript
スター
2.2k
フォーク
757
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AllenFang/react-bootstrap-table のほかの issue

AllenFang/react-bootstrap-table の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。