[go: up one dir, main page]

Filtered Search > TypeError: Cannot read properties of undefined (reading 'split')

Hi all!

Working on some specs in the GitLab project for base_token.vue, and running into some issues - most seem to be due to the implementation, but a couple appear to originate from this project.

Steps to reproduce:

  • on empty search bar
  • click the input field
  • click the "Author" suggestion
  • click the "Author" token

expected result: the token is open for editing or goes away (not sure which)

actual result: Syntax error

filter_error

On a side note, I was curious what the filtered search handling would look like with the help of a state machine, so I threw together a demo

it's not 1:1 as it's more about demoing the event handling control (tokenizes on enter instead of space), but does allow some finer control for events and tries to support editing any token segment and 'Esc'ing an edit.

The implementation is pretty poor and looks like the beginning of a Gilded rose kata, but I would love to hear thoughts on the strategy and result!

Edited by Sam Beckham