-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat(tw): init listbox component #4421
base: master
Are you sure you want to change the base?
Conversation
See issue #4446 |
Need to add docs |
…ing, minor ts revisions
…nts and their inputs
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.
really nice to be able to test it in the form context
few things i noticed while testing in the form:
- it does not show the required field message
- it does not close the dropdown when i select a other field
- in de default theme the selected item background color is the same a the page background color, as a result popdown feels a bit broken / strange ?
- the dropdown does not close when i click outside the form
- the select value does not right align with the oder field values
as notes in de code comments, i suggest to move the data fetch outside of the form component and preferably triggered from the component that requires the data ( lazy), else we and up with large if else blocks the do al kind of data fetches for different component types.
Quality Gate passedIssues Measures |
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.
nice. I would like to integrate this into #4585 so I can also provide option to have checkbox/radio or select.
Quality Gate passedIssues Measures |
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.
I would want to make sure that CheckboxGroup, RadioGroup, Lisstbox share types where they can.
And then the make the 'ref' version of those a wrapper around them as you can see in the RefInput PR #4585
@@ -97,3 +97,10 @@ export type columnValue = string | number | boolean | columnValueObject; | |||
interface columnValueObject { | |||
[x: string]: columnValue; | |||
} | |||
|
|||
export type IInputValue = string | number | boolean; |
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.
can we merge this with the other similar data type, I believe it is called ColumnValue?
This is special subset.
@@ -35,30 +35,54 @@ function validate(value: columnValue) { | |||
|
|||
formFieldInput.value.validate(value); | |||
} | |||
|
|||
const refData = ref(); |
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.
I am on the fence if we want to do this here. How will you implement search?
In my opinion it is best to organize the loading (lazily) per input so we can differentiate behaviors.
Which will be different between select, checkbox, and ontology.
const refData = ref(); | ||
|
||
onMounted(async () => { | ||
if (["ONTOLOGY", "ONTOLOGY_ARRAY"].includes(props.column.columnType)) { |
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.
I don't want this here.
@@ -0,0 +1,369 @@ | |||
<template> |
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.
So this component will be 'InputListbox'?
I would be happier if we move it to /components/input/Listbox
What are the main changes you did:
how to test:
todo: