File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
28
28
- [#2257](https://github.com/plotly/dash/pull/2257) Fix tuple types in the TypeScript component generator.
29
29
- [#2293](https://github.com/plotly/dash/pull/2293) Fix Dropdown useMemo not detecting equal objects
30
30
- [#2277](https://github.com/plotly/dash/pull/2277) Use dropdown styles from node_modules, instead of from stored css file
31
+ - [#2105](https://github.com/plotly/dash/pull/2105) Fix order of dash component libraries imports.
31
32
32
33
### Changed
33
34
Original file line number Diff line number Diff line change @@ -219,6 +219,30 @@ def gen_salt(chars):
219
219
)
220
220
221
221
222
+ class OrderedSet (collections .abc .MutableSet ):
223
+ def __init__ (self , * args ):
224
+ self ._data = []
225
+ for i in args :
226
+ self .add (i )
227
+
228
+ def add (self , value ):
229
+ if value not in self ._data :
230
+ self ._data .append (value )
231
+
232
+ def discard (self , value ):
233
+ self ._data .remove (value )
234
+
235
+ def __contains__ (self , x ):
236
+ return x in self ._data
237
+
238
+ def __len__ (self ):
239
+ return len (self ._data )
240
+
241
+ def __iter__ (self ):
242
+ for i in self ._data :
243
+ yield i
244
+
245
+
222
246
def coerce_to_list (obj ):
223
247
if not isinstance (obj , (list , tuple )):
224
248
return [obj ]
Original file line number Diff line number Diff line change 5
5
import uuid
6
6
import random
7
7
8
- from .._utils import patch_collections_abc , stringify_id
8
+ from .._utils import patch_collections_abc , stringify_id , OrderedSet
9
9
10
10
MutableSequence = patch_collections_abc ("MutableSequence" )
11
11
16
16
class ComponentRegistry :
17
17
"""Holds a registry of the namespaces used by components."""
18
18
19
- registry = set ()
19
+ registry = OrderedSet ()
20
20
children_props = collections .defaultdict (dict )
21
21
22
22
@classmethod
You can’t perform that action at this time.
0 commit comments