1rosehip / 1rosehip/jplist

checkbox text filter weird results

オープン 初心者向け
#326 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
435
フォーク
168
PR マージ指標
30日以内にマージされた PR はありません

説明

Yes, I know this will not be fixed, I'm just logging this so someone else with this issue does not "burn" 2.5 hours of debugging like I did..
On an existing project with this version of jpList I noticed that the filter results using the Checkbox-text-filter were incorrect.
After a lot of testing I found that the results are incorrect when the value contains a hyphen (-)

This does not work correctly:

```

Nature

Grade-2


```

This does:

```

Nature

Grade-2


```

So I simply replaced the - with _ (is an option in my use case) and the filtering worked correctly

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

jplistのソースコード内、おそらくjplist.jsのようなファイルやmodulesディレクトリにある、チェックボックステキストフィルターの実装を確認してください。問題は、フィルター値内のハイフンが誤ったマッチングを引き起こすことです。まず、'checkbox-text-filter'またはdata-control-typeの処理を検索してください。提供されたHTMLの例でバグを再現し、次に値がどのように比較されているかを確認するためにフィルタリングロジックを調べてください。修正では、ハイフンを含む値が正しく扱われるようにする必要があり、正規表現や文字列比較の調整が必要になる可能性があります。

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

評価

技術スタック
javascript, jquery
領域
frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
65/100

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

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