mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-11-13 00:11:06 +03:00
Move InputField into Base module
This commit is contained in:
parent
c0827c1a3f
commit
b3428e5efc
@ -4,7 +4,7 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
|
||||
module Monomer.Widgets.Singles.InputField (
|
||||
module Monomer.Widgets.Singles.Base.InputField (
|
||||
InputFieldCfg(..),
|
||||
InputFieldState(..),
|
||||
inputField_,
|
||||
@ -193,13 +193,12 @@ makeInputField config state = widget where
|
||||
|
||||
merge wenv node oldNode oldState = resultReqs newNode reqs where
|
||||
oldInfo = node ^. L.info
|
||||
oldValue = _ifsCurrValue oldState
|
||||
oldText = _ifsCurrText oldState
|
||||
oldPos = _ifsCursorPos oldState
|
||||
oldSel = _ifsSelStart oldState
|
||||
value = getModelValue wenv
|
||||
newText
|
||||
| oldValue /= getModelValue wenv = toText value
|
||||
| fromText oldText /= Just (getModelValue wenv) = toText value
|
||||
| otherwise = oldText
|
||||
newTextL = T.length newText
|
||||
newPos
|
||||
|
@ -21,7 +21,7 @@ import qualified Data.Text as T
|
||||
|
||||
import Monomer.Core
|
||||
import Monomer.Core.Combinators
|
||||
import Monomer.Widgets.Singles.InputField
|
||||
import Monomer.Widgets.Singles.Base.InputField
|
||||
|
||||
import qualified Monomer.Lens as L
|
||||
|
||||
|
4
tasks.md
4
tasks.md
@ -616,7 +616,8 @@
|
||||
|
||||
Next
|
||||
- Create Datetime field
|
||||
- Initial value should not be forced. Check if Maybe is a possibility
|
||||
- Initial value should not be forced.
|
||||
- Can both direct field and Maybe version be provided?
|
||||
- Create ContextMenu (could work similarly to Tooltip)
|
||||
- Rename ListView -> SelectList
|
||||
- Add support for multiple selection
|
||||
@ -630,7 +631,6 @@ Future
|
||||
- https://github.com/zw3rk/toolchain-wrapper
|
||||
- https://medium.com/@zw3rk/a-haskell-cross-compiler-for-ios-7cc009abe208
|
||||
- https://www.tweag.io/blog/2020-11-25-asterius-th/
|
||||
- Remove attoparsec dependency (only used in numericField to validate format)
|
||||
- Create File Selector
|
||||
- Create GridView
|
||||
- Adjusts column width and row height (not possible to have both combining hstack/vstack)
|
||||
|
Loading…
Reference in New Issue
Block a user