Fork me on GitHub
#humbleui
<
2022-12-31
>
lilactown22:12:51

while building my 7-humble-guis, I forked the text-field component to add the ability to pass in fine grained event handlers. E.g. an https://github.com/lilactown/7-humble-guis/blob/b89f497dfc95007faac617925f918cb70eabc28e/src/town/lilac/humble/text_field.clj#L704-L716 handler that only gets called when the user is typing into the input I found that for some apps, e.g. the temperature convertor, that differentiating between the user event that initiated a state transitions really simplified the state management.

Quest16:03:10

I might PR this into HumbleUI. I'd like a list of search results that autoupdates as a user types into a search-box. on-change seems like the right event, though perhaps there's some other trick that could get this done in the current library impl?

Quest17:03:19

^ Implemented on-change into up-to-date local main. Appreciate the code, it worked first try. I can PR this, but looks like @U4YGF4NGM was already considering doing this based on this issue: https://github.com/HumbleUI/HumbleUI/issues/68

lilactown19:03:17

I would go ahead if I were you, I haven't had enough time to PR it yet

Quest19:03:54

Will do & thanks. Might take a while; ran into some other issues that I wrote up in the main channel, but progress! *Edit: Ended up unblocked on issues, so threw up PR with the side-effecting on-change code: https://github.com/HumbleUI/HumbleUI/pull/69