Closed RomanFausek closed 1 year ago
I'm glad that you found this useful :-)
Yes, having a such selector would be useful. I'm thinking about having wild fallback selector, which would be used at the same or deeper level, if no explicit selector were provided for it. For example:
'**': {
playground: null,
},
I'll need to test how it'd work.
I added support for nested wildcards in 1.2.0 as I sketched it above.
It allowed simplifying this sample configuration:
const order = {
articles: null,
elements: {
'*': { default: null },
},
components: {
'*': { default: null },
}
};
to this:
const order = {
articles: null,
elements: null,
components: null,
'**': { default: null }
};
Will it work for you?
@prantlf I didn't notice your messages, sorry. I didn't check the implementation yet but does it support more than two levels?
'*': {
playground: null,
'*': {
playground: null,
'*': {
playground: null,
},
},
},
This saved so much time for me! 🚀
I was thinking that it would be nice for the wild selector to go to any level. Let's say I want
Playground
story first on any level.Right now I have to do this:
but once I introduce a new (deeper) level, this sorter won't work for it anymore