Found a few bugs when loading via server side ajax
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
StateRestore.ts の 751-758 行、StateRestoreCollection.ts の 641-647 行および 878 行から始めます。リンク先の ajax の例を使って更新シナリオを再現し、読み込まれた状態を更新できるか、また関数形式の load callback が発火するかを確認します。サーバーから読み込まれた状態が正しい事前定義済みステータスを保持し、更新後に文書化された更新動作が機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Have been having issues trying to get StateRestore to load all states via server side Ajax call
using the function style ajax calls per See Here to control all the server side saving
I have never seen if (data.action === 'load') option ever fire... so I resorted to using the ajax stateRestore option on initial load
as See Here
Everything works until browser refresh and then you can't update any of the existing based on this area in StateRestore.ts (line 751-758)
//If the state is predefined there is no need to save it over ajax or to local storage
if (this.s.isPreDefined) {
if (passedSuccessCallback) {
passedSuccessCallback.call(this);
}
return;
}
what occurs is all the states are set to isPreDefined: true even for ajax loading
There is also a typo in StateRestoreCollection.ts where you in line 641-647
currState.stateRestore = {
isPredefined: false,
state: id,
tableId: this.s.dt.table().node().id
};
It s/b isPreDefined not isPredefined
I looked at your source code and I don't ever see a callback for the load process, and all the function Ajax examples don't ever load server side.
Your above initialisation/ajax.html example fails the same way
Steps:
1: Load a new state and try all the options (Rename, Update, Remove) they all fire a callback to server
2: Keep at least one state and re-fresh browser.
3: You can do all options except Update (check and all the loaded states are now IsPreDefined)
In my case, I never have preDefined: in the DataTable settings... so I turned off the true condition in StateResotrCollection.ts
_addPreDefined (line 878)
So in closing,
A) is there a way to load via function call Ajax from the server or
B) you should change the _addPreDefined call to add a boolean to set that isPreDefined to false for Ajax loads
Thanks
- 主要言語
- JavaScript
- スター
- 3
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataTables/StateRestore のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
DataTables/StateRestore#8 · コメント 6 件 ·
DataTables/StateRestore の issue をすべて見る
似ている issue
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.text対応中かも @ManojDevarajulu が今日担当しました。 オープンpossible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Mintplex-Labs/anything-llm#6737 ·
メンテナーはふだん 1 日以内に返信
-
check:passed feeds:add
難易度 2/5 1時間未満 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
motiondivision/motion#3935 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
joomla/joomla-cms#48626 ·
メンテナーはふだん 1 日以内に返信