SuffolkLITLab/docassemble-ALToolbox

Remove the double scroll bar....pretty please.

ladracer opened this issue · 4 comments

question: |
 Select your ${ ordinal(i) } document.
subquestion: |
 Start typing to find the ${ ordinal(i) } document you want to create.
fields:
 - Search: selected_templates[i].template
   input type: ajax
   action: template_filter
   trigger at: 2
under: |
 ${ display_template(collapse_all_templates, scrollable=True, collapse=False) }

double scroll bar issue

Jonathan Pyle
1 hour ago
It looks like that function was written by purplesky2016 on GitHub but I'm not sure who that is. Maybe
@Quinten Steenhuis
knows. There is probably a way to make the right-hand scroll bar disappear using CSS.

Quinten Steenhuis
1 hour ago
@Michael Koch
you should open a bug on ALToolbox. I'm not sure if it's specific to your CSS theme though

Quinten Steenhuis
1 hour ago
@team member
has been doing some bug fixing on that repo recently

I think I need a link to this code to troubleshoot. It's not a problem we've seen in our code, maybe because we haven't tried to put a table in a collapse template before. It would be most helpful to see the whole repo if possible, but if not then at least the full files where this code and related code exists.

Copying the code and adding syntax:

---
id: select a document
progress: 0
question: |
  Select your ${ ordinal(i) } document.
subquestion: |
  You can create up to **three** documents simultaneously.
  Simply start typing to find the ${ ordinal(i) } document you want to
create.
fields:
  - Search: selected_templates[i].template
    input type: ajax
    action: template_filter
    trigger at: 3
under: |
  ${ display_template(collapse_all_templates, scrollable=True,
collapse=False) }
section: section_choose_templates
---
template: collapse_all_templates
subject: |
  Scroll to view available documents.
content: |
  ${ all_templates_table }
---
table: selected_templates.table
rows: |
  selected_templates.complete_elements()
columns:
  - Name: |
      nice_template_name(row_item.template) if hasattr(row_item,
"template") else "not yet defined"
  #- Fields: |
  #
 f'{len(DAStaticFile(filename=f"data/templates/{row_item.template}").get_docx_variables())}
fields'
edit:
  - template
delete buttons: True
---

Michelle figured out that by adding the following to the css it would resolve the issue. Thanks again Michelle.

.table-responsive {
overflow-x: revert;
-webkit-overflow-scrolling: revert;
}
/* need to test on mobile */