framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Accent insensitive search on search and smart-select

Open JCKodel opened this issue 9 years ago • 4 comments

This is a (multiple allowed):

  • [x] bug

  • [x] enhancement

  • [ ] feature-discussion (RFC)

  • Framework7 Version: "framework7": "^1.5.4",

  • Platform and Target: cordova browser

  • Live Link or JSFiddle/Codepen:

What you did

Created a Vue listitem with accented strings (ex.: Coração):

<f7-list-item smart-select smart-select-searchbar smart-select-open-in="popup" title="Operações" smart-select-searchbar-placeholder="Pesquisar">
				<select name="car" multiple="multiple" >
					<optgroup v-for="operation in operations" v-bind:label="operation.text">
						<option v-for="item in operation.children" v-bind:value="item.id">{{item.text}}</option>
					</optgroup>
				</select>
			</f7-list-item>

Expected Behavior

While searching the list, when typing coracao, it should find the option Coração (case and accent insensitive).

Or at least give me an event to program it.

Actual Behavior

coracao filters Coração

JCKodel avatar May 16 '17 16:05 JCKodel

@JCKodel I used this to this

Dom7.removeDiacritics $$.removeDiacritics(text) - Replace diacritics in specified text string with standard latin characters

text - string - Text string var text = $$.removeDiacritics('ÁÓL'); console.log(text); //-> 'AOL'

Extracreative avatar Aug 24 '17 07:08 Extracreative

chit

เมื่อ 24 ส.ค. 2017 14:52 "Luke Wheatle" [email protected] เขียนว่า

@JCKodel https://github.com/jckodel I used this to this ` Dom7.removeDiacritics $$.removeDiacritics(text) - Replace diacritics in specified text string with standard latin characters

text - string - Text string var text = $$.removeDiacritics('ÁÓL'); console.log(text); //-> 'AOL' `

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nolimits4web/Framework7/issues/1558#issuecomment-324561192, or mute the thread https://github.com/notifications/unsubscribe-auth/AT6XhZkTJ8lyBovsF7xHeV2eCbz9bDTiks5sbSu_gaJpZM4NcyoQ .

chittattoo avatar Aug 24 '17 09:08 chittattoo

I know how to remove accents from a string, but there is no event (AFAIK) to do so on F7 autocomplete.

JCKodel avatar Aug 26 '17 00:08 JCKodel

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jun 24 '18 23:06 lock[bot]