-
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
Conversation
See issue #4446 |
Need to add docs |
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
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.
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.
meanwhile I don't mind this here temporarily if we have that mutual understanding.
great, in discussion we concluded:
|
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.
my main requested changes is to approach listbox as part of a family of option select inputs, together with checkboxgroup and radiogroup. So make sure their interface is the same.
In addition I am confused by your use of refs to link state of the list items. I would have expected simply to use emit(update:modelValue) to happen in the list. I think this non-standard approach makes maintenance more complex and has the risk of unforseen side effects as we might bypass the normal vue state/refresh handling.
@@ -104,3 +104,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.
I think the IInputValue should be integrated with columnValue types?
- primitiveColumValue = string | number | boolean;
- columnValue = primitiveColumnValue | columnValueObject | columnValueObject[]
- columnValueObject = [x: string]: columnValue
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.
meanwhile I don't mind this here temporarily if we have that mutual understanding.
|
||
export type IInputValue = string | number | boolean; | ||
|
||
export type IInputValueLabel = { |
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 please merge this type with the same time for checkboxgroup and radiogroup?
} | ||
|
||
export interface IListboxLiRef { | ||
li: HTMLLIElement; |
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 understand why we would need this html element management?
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 discussed that ref are needed for aria behavior and that we will do other refactorings after the merge.
Quality Gate passedIssues Measures |
Merging now and will refactor in the next PR
This reverts commit c439a85.
What are the main changes you did:
how to test:
todo: