-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comment column to normal swate with manually adaptable name #633
Conversation
@@ -86,7 +86,13 @@ let private SearchBuildingBlockHeaderElement (ui: BuildingBlockUIState, setUi, m | |||
// Dropdown building block type choice | |||
Dropdown.Main(ui, setUi, model, dispatch) | |||
// Term search field | |||
if state.HeaderCellType.HasOA() then | |||
if state.HeaderCellType = CompositeHeaderDiscriminate.Comment then | |||
Daisy.input [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing prop.defaultValue
@@ -179,14 +185,15 @@ let private AddBuildingBlockButton (model: Model) dispatch = | |||
[<ReactComponent>] | |||
let Main (model: Model) dispatch = | |||
let state_bb, setState_bb = React.useState(BuildingBlockUIState.init) | |||
let inputValue, setInputValue = React.useState "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put this into BuildingBlock.Model
with a more descriptive name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want to share the same information between page switches. Everything in the ReactComponent is lost when switching to another page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to clarify: "page" means sidebar tab
@@ -185,15 +188,15 @@ let private AddBuildingBlockButton (model: Model) inputValue dispatch = | |||
[<ReactComponent>] | |||
let Main (model: Model) dispatch = | |||
let state_bb, setState_bb = React.useState(BuildingBlockUIState.init) | |||
let inputValue, setInputValue = React.useState "" | |||
let commentHeader, setCommentHeader = React.useState model.AddBuildingBlockState.CommentHeader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really bad style!! Just use the value straight from model. No sense in binding it one more time to a react state
Closes #591