Comments (11)
@maaslalani Can this be re-opened? It seems #123 was reverted by commit 51377e6, so this is still an issue.
from huh.
Thanks so much for reporting this issue @dfalgout, I will take a look.
from huh.
@dfalgout I had the same issue and workaround was to define the form myself, set form theme then add the widget to the form
from huh.
Off the cuff, I'd guess that this is only happening on one-off elements, i.e.
huh.NewMultiSelect().
WithTheme(customTheme()).
Run()
Whereas the following works in my testing:
huh.NewForm().
WithTheme(customTheme()).
Run()
from huh.
my guess its a similar problem to #97
from huh.
This is indeed semi-specific to using fields directly, but it's only because they use the global Run
internally, which is the source of the issue.
In order from call site:
Line 425 in 355812c
Line 6 in 9cd22a8
Lines 72 to 84 in 9cd22a8
Lines 225 to 227 in 9cd22a8
Lines 95 to 97 in 9cd22a8
from huh.
I believe this issue should be solved if we simply check if the theme or keymap is already set on the field before overriding it. This will make things work individually and allow changing themes / keymaps for individual fields as part of a larger form as well.
from huh.
This should be fixed by #123, let us know if this works for you!
If it doesn't please feel free to re-open this issue or create a new one!
from huh.
Can confirm with 0.30.0 it's still an issue, please re-open.
from huh.
Apologies! Thanks for letting us know, re-opened the issue for now.
from huh.
Okay after a bunch of testing I believe I have solved it correctly this time, please do try it out and let me know if everything works correctly.
from huh.
Related Issues (20)
- Empty string as negative confirm should show only one affirmative button HOT 3
- Foreground color on any of the Focused.* fields do not apply HOT 3
- Foreground color not working on new line HOT 2
- FilePicker example doesn't compile HOT 1
- If the spinner drops out prematurely, input is invisible HOT 1
- Theme not applied to input HOT 1
- Black and white color Spinner HOT 1
- Releaase 0.3.1 for File Picker HOT 1
- Theme.FieldSeparator no longer supported in 0.4.x? HOT 1
- MultiSelect's filterable set to "false" will have no effect.
- Add Filterable for Select HOT 2
- Empty confirmation considered invalid in accessible mode HOT 1
- Add "Select All" and "Invert" Shortcuts to Multiselect
- Add `WithInput` to specify input stream
- Overriding KeyMaps and KeyBinds
- Fullscreen / AltScreen does not take the full screen - there seems to be a maximum height
- Multiple forms can interfere with each other
- Keypresses are ignored upon reaching 2nd form (examples/gh)
- Windows: Tab/Enter keys not handled correctly HOT 1
- bug: note.render should escape everything in code block
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huh.