Does calling JSONStore.init multiple times on the same collection have any negative side effects

前端 未结 1 1771
野性不改
野性不改 2021-01-28 00:44

I wanted to confirm the following:

  1. Before I call the WL.JSONStore.init method on a collection, must I first call the removeCollection method?

  2. Ca

1条回答
  •  醉梦人生
    2021-01-28 01:42

    1. If you want to remove the contents of a collection: init(collection1) -> removeCollection(collection1) -> init(collection1).

    2. Correct. You can do: init(collection1) -> init(collection1) -> init(collection1) -> ... without any negative side-effects.

    3. Yes.

    Note: One common issue is that the search fields are not dynamic, you must call the removeCollection API first if you want to init with new search fields or additional search fields.

    0 讨论(0)
提交回复
热议问题