Limit total entries displayed by datalist

后端 未结 2 1431
予麋鹿
予麋鹿 2020-12-05 14:46

When there is a long set of elements in a datalist, they will all get displayed with a scroll bar next to them. Is there an easy way to only display the top 5, and just cut

2条回答
  •  鱼传尺愫
    2020-12-05 15:26

    No javascript example:

      
      
    

    Took me a minute of experimenting :) PS: The minimum length should protect against empty submissions. However, you'll need to select the object and then hit backspace to see :|

提交回复
热议问题