Create SubclassCheckbox component#151
Conversation
| return this.$store.getters.subclasses; | ||
| }, | ||
| set( value: boolean ): void { | ||
| this.$store.dispatch( 'setSubclasses', value ); |
There was a problem hiding this comment.
No, this is missing the info about the conditionIndex. In general, I think it would be the better idea if this component doesn't talk to the store at all and just has a value prop and emits an input event when the checkbox is toggled. Let's let QueryCondition deal with the talking to the store.
There was a problem hiding this comment.
oh, true.. 😓 totally forgot about the index.
85e8c53 to
93ed2a7
Compare
micgro42
left a comment
There was a problem hiding this comment.
Almost there, I think. Just one prop missing
| @@ -0,0 +1,37 @@ | |||
| <template> | |||
| <div class="querybuilder__include-subclasses"> | |||
| <input | |||
There was a problem hiding this comment.
Now we need a way to to actually set the checked state from the outside. I.e. some boolean prop (e.g. value or isChecked) that then is assigned to the checked attributed of the input 🙂 .
There was a problem hiding this comment.
you mean for when it's coming from the store at the start?
93ed2a7 to
7001c94
Compare
| props: { | ||
| isChecked: { | ||
| type: Boolean, | ||
| required: true, |
There was a problem hiding this comment.
it will always be in the store. so i guess it makes sense to make it required.
7001c94 to
ad46605
Compare
| <div class="query-condition__toggle-button-group"> | ||
| <Button disabled="true" style="border-right: 1px darkgrey solid;">with</Button> | ||
| <Button disabled="true">without</Button> | ||
| <NegationToggle value="without" /> |
There was a problem hiding this comment.
I think this was added accidentally :)
ad46605 to
5e6a917
Compare
first commit: added translations
second commit: added component and test