mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-03-11 05:19:13 +00:00
added a new search :pf:
This commit is contained in:
@@ -16,6 +16,8 @@ struct TrieTestingView: View {
|
|||||||
@State var filterTerm: String = ""
|
@State var filterTerm: String = ""
|
||||||
@State var filterResult: [String] = []
|
@State var filterResult: [String] = []
|
||||||
|
|
||||||
|
@State var filterTerm2: String = ""
|
||||||
|
|
||||||
@State var uikit: Bool = false
|
@State var uikit: Bool = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -59,6 +61,13 @@ struct TrieTestingView: View {
|
|||||||
.modifier(numericTextCompat())
|
.modifier(numericTextCompat())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextField("", text: $filterTerm2)
|
||||||
|
.textFieldStyle(.roundedBorder)
|
||||||
|
.border(.orange)
|
||||||
|
.onChange(of: filterTerm2) { _ in
|
||||||
|
withAnimation { filterResult = hoarder.emojis.filter({ $0.name.localizedCaseInsensitiveContains(filterTerm2) }).map({ $0.name }) }
|
||||||
|
}
|
||||||
|
|
||||||
if uikit {
|
if uikit {
|
||||||
EmojiCollectionView(hoarder: hoarder, items: filterResult)
|
EmojiCollectionView(hoarder: hoarder, items: filterResult)
|
||||||
.id(filterResult)
|
.id(filterResult)
|
||||||
|
|||||||
Reference in New Issue
Block a user