framework7io / framework7io/framework7

[Smart Select] error message / item info

Open
#2,357 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
JavaScript
Stars
18.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

This is a (multiple allowed):

  • bug
  • enhancement
  • feature-discussion (RFC)

Motivation:
To be consitent to the other input elements it would be great to have an error message / item info for smart select as well (-> enhancement). An error message is e.g. pretty useful if there is a dependency between multiple inputs (choosen value in smart select A does does not work if a certain value is choosen in smart select B).

Currently, framework7 (v2) does not not recognize the "item-after" div in case it is not a direct child of item-inner (-> bug?)

Expected Behavior / proposal

DOM structure like:

...
 <div class="item-content">
     <div class="item-inner">
         <div class="item-title">title</div>
         <div class="item-select-wrapper">
            <div class="item-after">selected value</div>
            <div class="item-input-error-message">errormsg</div>
         </div>
      </div>
   </div>

> smart select recognizes the "item-after" div within the wrapper correctly
> some css definition for item-inner-with-custom-error, items-select-wrapper
> update documentation (example)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the Smart Select implementation and the existing handling of item-after and input error messages. Compare its rendered structure with the proposed wrapper, then verify the selected value and error message are recognized, the related CSS is covered, and the documentation example is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript
Domain
documentation, frontend, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.