Skip to content

Conversation

@sadiqkhoja
Copy link
Contributor

@sadiqkhoja sadiqkhoja commented Oct 20, 2025

Closes getodk/central#1344

Before submitting this PR, please make sure you have:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

</label>
</div>
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events, vue/require-explicit-emits -->
<label v-for="{ value, text } of options" :key="value" class="btn btn-toggle" :class="{ disabled, active: model === value }" @click="$emit('update:model-value', value)">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clicking the label changes the state of below hidden radio button (done by bootstrap) but model update event is not emitted.

<span>{{ text }}</span>
</label>
</div>
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events, vue/require-explicit-emits -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click-events-have-key-events: not required as user can use arrow keys to toggle.
require-explicit-emits: model definition implicitly does that

@sadiqkhoja sadiqkhoja force-pushed the fixes/1344-toggle-button-styling branch from 7567b0c to 2c8445f Compare October 20, 2025 15:53
@sadiqkhoja sadiqkhoja marked this pull request as ready for review October 20, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style toggle between table and map views

1 participant