Skip to content

TagList - Able to exceed max value when close-on-select is set to false  #838

@diakonovm

Description

@diakonovm

Reproduction

https://formkit.com/playground?css-framework=tailwind&fkv=latest&fileTab=taglist-option-loader-additional-data.vue&files=jc%5B%28%27name%21%27taglist-option-loader-additional-data.vue%27%7Eeditor%21%27%3CscripQsetup%3EAimporQ%28+ref+%29%25%22vue%22AconsQmoWReWw%7Fref%7Bnull%7D%5ECzs%7B%28+page%2C+hasNextPagZ%29D%23popularLe%3Den-US%26page%3D%24%28page%29%60A5%7DA5GVif+%7BpagZ%27%3A%3D%3D+data.total_pages%7D+hasNextPage%7B%7DVreturn+Y.map%7B%7Bitem%7D+%3D%3E+%7B%28+labelXitem.title%2C+valueXitem.id+%29%7D%7DA5%29A5return+%5B%5DA%29A%5EMoW%7Bid%2C+cachedOptionD%23%24%28id%29%2FreWwsLe%3Den-US%60A5%7DA5GV%2F%2F+HerZwZarZsetting+thZvaluZof+ourV%2F%2F+%60moWReWw%60+ref+to+thZfirsQreWwVif+%7BY+%26%26+Y.length%7D+%28V5moWReWw.valuZ%3DV55Y%5B0%5D.contenQ%2B+%22+-+%22+%2B+Y%5B0%5D.authorV%29V%C2%81cachedOption.label%2C+valueXid+%29A5%29A5%C2%81%22Error+loading%22+%29A%29A%3C%2Fscript%3EAA%3Ctemplate%3EA5%3CFormKiQtype%3DBformB+%3Aactions%3DBfalseB%3EV%3CFormKitV5type%3DBtaglistBV5name%3DBczBV5label%3DBChoosZa+currently+popular+moWBV5placeholder%3DBExamplZplaceholderBV5%3Aoptions%3DBloadCzsBV5%3Aoption-loader%3DBloadMoWBV5%3Aclose-on-select%3DBfalseBV5max%3DB2BV%2F%3EV%3CprZclass%3DBmoW-reWwB%3E%28%28+moWReWw+%29%29%3C%2Fpre%3EA5%3C%2FFormKit%3EA%3C%2Ftemplate%3EAA%3Cstyle%3EA.moW-reWw+%28A5white-spaceXpre-wrap%3BA%29A%3C%2Fstyle%3EA%27%7Eadded%21true%29%2C%28%27name%21%27formkit%C2%80%2F*+In+this+file%2C+exporQyour+final+config.AIQwill+automatically+bZinjected+into+thZplayground+for+you.AImports%25other+playground+files+arZsupported.+*%2FAAimporQ%28+generateClasses+%29J%22AimporQ%28+genesisIcons+%29%25B%40formkit%2FiconsBAimporQgenesisJ%2Fdist%2Ft%7Ccss%2Fgenesis%22AAexporQdefaulQ%28A5iconsX%28V...genesisIconsA5%29%2CA5configX%28VclassesXgenerateClasses%7Bgenesis%7DA5%29A%29Aq%2C%28%27name%21%27t%7C%C2%80imporQFormKitT%7CJ%2Ft%7Ccss%22AAwindow.t%7C.config%7F%28A5pluginsX%5BVFormKitT%7CA5%5DA%29q%5D5++A%5CnB%5C%27D%7D+%28A5consQres%7FawaiQfetch%7BV%60https%3A%2F%2FapiGif+%7Bres.ok%7D+%28VconsQdata%7FawaiQres.json%7B%7DJ%25%22%40formkit%2FthemesL%3Fapi_key%3Df48bcc9ed9cbce41f6c28ea181b67e14%26languagQt+VA55WvieX%3A+Ydata.resultsZe+q%27%7Eremovable%21true%7Esilent%21true%7Eadded%21true%29zurrentlyPopularMoW%23.themoWdb.org%2F3%2FmoW%2F%25+from+%5EAasync+function+load%7Cailwind%7F+%3D+%C2%80.config.js%27%7Eeditor%21%27%C2%81return+%28+labelX%01%C2%81%C2%80%7F%7C%5E%25%23zqZYXWVQLJGDBA5_&imports=jc%28%27name%21%27ImportMap%27%7Eeditor%21%27%28*+1vue%5C%211https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fvue%403%2Fdist%2Fvue.esm-browser.min.js0*%29*%27%29*%5Cn0%5C%271+0%0110*_

Describe the bug

For a taglist component, when close-on-select is set to false with a max set as well, you are able to exceed the max value when clicking options within the list.

Environment

@formkit/nuxt ^0.17.4
@formkit/pro ^0.112.7

Metadata

Metadata

Labels

ProPertains to FormKit Pro🐛 bugVerified bug by team🚀 release-readyFeature or fix is complete and on an upcoming release branch🟡 priority-22. Medium priority issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions