Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Limit selection of translations: User should not be able select more than xx translations #718

Closed
naveed-ahmad opened this issue Apr 6, 2017 · 7 comments

Comments

@naveed-ahmad
Copy link
Contributor

Maybe max 10 translations.

@naveed-ahmad naveed-ahmad changed the title Limit selection of translations: User should not select more than xx translation Limit selection of translations: User should not be able select more than xx translations Apr 6, 2017
@azeezolaniran2016
Copy link
Contributor

Hi @naveed-ahmad, I would love to handle this issue. Any hints on where I could start would be appreciated.

@naveed-ahmad
Copy link
Contributor Author

Salam @azeezolaniran2016 thanks, feel free to take this :)

We currently have 60 translations, we might have more in future. For now user can select all translations, which don't make any sense plus api call with 60 translations will put huge load on server. One simple solution is to simply disable the translation checkboxes when user select 10 translations, if user de-select one then we enable all checkboxes again. Basically user shouldn't be able to select more than 10 translation.

2017-05-22_0113

Let me know if you've any question.

@azeezolaniran2016
Copy link
Contributor

Thank you @naveed-ahmad.

@azeezolaniran2016
Copy link
Contributor

Salam @naveed-ahmad. I have gone through this and I've decided to keep a count of how many items are checked and decide which checkboxes to enable or disable based of the checked count.

I have also discovered that the custom CheckBox component does not expose the 'disable' property. Is there a work around for this/ what do you suggest ?

@azeezolaniran2016
Copy link
Contributor

azeezolaniran2016 commented May 22, 2017

Oh, interesting. This has lead me to discover https://github.com/quran/common-components.
I'm thinking of raising a issue there to add the functionality of disabling Checkbox components (if not already created).

@naveed-ahmad
Copy link
Contributor Author

@azeezolaniran2016 Update quran-component to 0.0.71 added the disabled functionality few hours ago. Sorry forget to inform you earlier :)

azeezolaniran2016 added a commit to azeezolaniran2016/quran.com-frontend that referenced this issue May 23, 2017
@azeezolaniran2016
Copy link
Contributor

Thanks @naveed-ahmad :)

azeezolaniran2016 added a commit to azeezolaniran2016/quran.com-frontend that referenced this issue May 23, 2017
azeezolaniran2016 added a commit to azeezolaniran2016/quran.com-frontend that referenced this issue May 25, 2017
azeezolaniran2016 added a commit to azeezolaniran2016/quran.com-frontend that referenced this issue May 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants